Skip to content

Commit 33be808

Browse files
twz123github-actions[bot]
authored andcommitted
Fix image bundle hash key calculation
The hash calculation did not take the image bundle list into account. String interpolation only works in "YAML" mode. If you are already in "script" mode, you need to use different techniques. This explains why the image bundle list was never picked up and why image bundles with the wrong content were shared between builds. Fixes: 4fc896e ("Unify Airgap and IPv6 test image build workflows") Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit 991ec04)
1 parent a888f28 commit 33be808

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/build-image-bundle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- name: "Cache :: Image bundle :: Calculate cache key"
5757
id: cache-image-bundle-calc-key
5858
env:
59-
HASH_VALUE: ${{ hashFiles('Makefile', '${{ inputs.image-bundle-name }}-images.txt', 'cmd/airgap/*', 'pkg/airgap/*') }}
59+
HASH_VALUE: ${{ hashFiles('Makefile', format('{0}-images.txt', inputs.image-bundle-name), 'cmd/airgap/*', 'pkg/airgap/*') }}
6060
run: |
6161
printf 'cache-key=build-%s-image-bundle-%s-%s-%s\n' "$IMAGE_BUNDLE_NAME" "$TARGET_OS" "$TARGET_ARCH" "$HASH_VALUE" >> "$GITHUB_OUTPUT"
6262

0 commit comments

Comments
 (0)