Skip to content

Commit 63bd065

Browse files
committed
Fix Docker cache contention issue in GitHub Actions workflow
1 parent 2a700de commit 63bd065

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ jobs:
8686
platforms: linux/amd64,linux/arm64,linux/arm/v7
8787
tags: ${{ steps.meta.outputs.tags }}
8888
labels: ${{ steps.meta.outputs.labels }}
89-
cache-from: type=gha
90-
cache-to: type=gha,mode=max
89+
cache-from: type=gha,scope=${{ github.workflow }}-${{ github.ref_name }}
90+
cache-to: ${{ github.event_name != 'pull_request' && format('type=gha,mode=max,scope={0}-{1}', github.workflow, github.ref_name) || '' }}
9191
build-args: |
9292
VERSION=${{ steps.meta.outputs.version }}
9393
COMMIT_SHA=${{ github.sha }}

0 commit comments

Comments
 (0)