Skip to content

Commit

Permalink
CI: remove SHA from image build GHA cache scope
Browse files Browse the repository at this point in the history
Unlike the cache action, the build-push action's GHA cache feature
seems to only do an exact comparison for the scope. Thus, new commits
lead to cache misses.
  • Loading branch information
MarkKoz committed Dec 27, 2021
1 parent 8abc3a1 commit c63f763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
set -euo pipefail
if [ "$GITHUB_EVENT_NAME" = 'pull_request' ]; then
cache_from="type=gha,scope=buildkit-${GITHUB_REF}-${GITHUB_SHA}"
cache_from="type=gha,scope=buildkit-${GITHUB_REF}"
cache_to="${cache_from},mode=max"
fi
echo "::set-output name=cache_from::${cache_from:-}"
Expand Down

0 comments on commit c63f763

Please sign in to comment.