Skip to content

Commit b54d557

Browse files
committed
init-g4w-sdk-for-pacman: fix caching
actions/cache/restore does a prefix match on the cache key to restore. [1] This can lead to restoring a different cache than we expect. In that case the cache-hit output is set to false, which further disturbs our workflows, since a cache was restored, but the output claims a cache miss. To work around this, turn the makepkg suffix into an infix. [1] actions/cache#1433 (comment) Signed-off-by: Matthias Aßhauer <mha1993@live.de>
1 parent b0fe5fa commit b54d557

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/init-g4w-sdk-for-pacman/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
https://github.com/git-for-windows/git-sdk-64 .tmp &&
2121
rev="$(git -C .tmp rev-parse HEAD)" &&
2222
echo "rev=$rev" >>$GITHUB_OUTPUT &&
23-
echo "cache-key=g4w-sdk-$rev${{ inputs.include-makepkg != 'false' && '+makepkg' || '' }}" >>$GITHUB_OUTPUT
23+
echo "cache-key=g4w-sdk${{ inputs.include-makepkg != 'false' && '+makepkg' || '' }}-$rev" >>$GITHUB_OUTPUT
2424
- name: restore cached git-sdk-64 subset
2525
id: restore-g4w-sdk
2626
uses: actions/cache/restore@v4

0 commit comments

Comments
 (0)