Skip to content

Commit 6f7db5a

Browse files
committed
Setup local cache for metal builds
Signed-off-by: Prabhu Subramanian <[email protected]>
1 parent 8227816 commit 6f7db5a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/npm-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ jobs:
103103
registry: ghcr.io
104104
username: ${{ github.actor }}
105105
password: ${{ secrets.GITHUB_TOKEN }}
106+
- name: Setup docker cache dir
107+
run: |
108+
mkdir -p /tmp/containers-cache
106109
- name: Extract metadata (tags, labels) for Docker
107110
id: meta
108111
uses: docker/metadata-action@v5
@@ -118,6 +121,8 @@ jobs:
118121
push: true
119122
tags: ${{ steps.meta.outputs.tags }}
120123
labels: ${{ steps.meta.outputs.labels }}
124+
cache-from: type=local,src=/tmp/containers-cache
125+
cache-to: type=local,dest=/tmp/containers-cache,mode=max
121126
- name: nydusify
122127
run: |
123128
nydusify convert --oci --oci-ref --source ${{ steps.meta.outputs.tags }} --target ${{ steps.meta.outputs.tags }}-nydus --prefetch-dir /opt/cdxgen
@@ -168,6 +173,9 @@ jobs:
168173
registry: ghcr.io
169174
username: ${{ github.actor }}
170175
password: ${{ secrets.GITHUB_TOKEN }}
176+
- name: Setup docker cache dir
177+
run: |
178+
mkdir -p /tmp/containers-cache
171179
- name: Extract metadata (tags, labels) for Docker
172180
id: meta
173181
uses: docker/metadata-action@v5
@@ -183,6 +191,8 @@ jobs:
183191
push: true
184192
tags: ${{ steps.meta.outputs.tags }}
185193
labels: ${{ steps.meta.outputs.labels }}
194+
cache-from: type=local,src=/tmp/containers-cache
195+
cache-to: type=local,dest=/tmp/containers-cache,mode=max
186196
- name: save private key to file
187197
run: |
188198
echo "$SBOM_SIGN_PRIVATE_KEY_DATA" | base64 -d > $GITHUB_WORKSPACE/private.key

0 commit comments

Comments
 (0)