Skip to content

Commit 829d552

Browse files
committed
Experiment with build caching
1 parent a98427c commit 829d552

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/debug-image.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ jobs:
8585
tags: ${{ steps.meta.outputs.tags }}
8686
labels: ${{ steps.meta.outputs.labels }}
8787
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
88+
build-args: |
89+
BUILDKIT_INLINE_CACHE=1
90+
cache-from: |
91+
type=gha
92+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LEGACY }}:buildcache
93+
cache-to: |
94+
type=gha,mode=max
95+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LEGACY }}:buildcache,mode=max,compression=zstd,oci-mediatypes=true
8896
8997
- name: If failed to create the image, send alert msg to dev team.
9098
if: ${{ failure() }}
@@ -155,6 +163,14 @@ jobs:
155163
tags: ${{ steps.meta.outputs.tags }}
156164
labels: ${{ steps.meta.outputs.labels }}
157165
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
166+
build-args: |
167+
BUILDKIT_INLINE_CACHE=1
168+
cache-from: |
169+
type=gha
170+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
171+
cache-to: |
172+
type=gha,mode=max
173+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max,compression=zstd,oci-mediatypes=true
158174
159175
- name: If failed to create the image, send alert msg to dev team.
160176
if: ${{ failure() }}

0 commit comments

Comments
 (0)