Skip to content

Commit 2ea679d

Browse files
Merge pull request #1914 from yiannistri/fix-slsa
fix: Include tag when invoking `slsactl download`
2 parents 3656a35 + 2232eda commit 2ea679d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release-v2.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ jobs:
143143
IMAGE_DIGEST=$( docker inspect --format='{{index .RepoDigests 0}}' ${URL} | sed 's/.*@//' )
144144
# Set as environment variable for next steps
145145
MULTI_PLATFORM_IMAGE="${{ env.STAGE_REGISTRY }}/rancher/${IMAGE}@${IMAGE_DIGEST}"
146-
echo "MULTI_PLATFORM_IMAGE"=${MULTI_PLATFORM_IMAGE} >> "$GITHUB_ENV"
146+
echo "MULTI_PLATFORM_IMAGE"=${MULTI_PLATFORM_IMAGE} >> "$GITHUB_ENV"
147+
148+
# Also set a tag-specific variable for provenance attestation step
149+
MULTI_PLATFORM_IMAGE_TAG="${{ env.STAGE_REGISTRY }}/rancher/${IMAGE}:${{ env.TAG }}@${IMAGE_DIGEST}"
150+
echo "MULTI_PLATFORM_IMAGE_TAG"=${MULTI_PLATFORM_IMAGE_TAG} >> "$GITHUB_ENV"
147151
fi
148152
149153
- name: Sign multi-platform image
@@ -165,7 +169,7 @@ jobs:
165169
i=0
166170
167171
while [ "${i}" -lt "${max_retries}" ]; do
168-
if slsactl download provenance --format=slsav1 "${MULTI_PLATFORM_IMAGE}" > provenance-slsav1.json; then
172+
if slsactl download provenance --format=slsav1 "${MULTI_PLATFORM_IMAGE_TAG}" > provenance-slsav1.json; then
169173
break
170174
fi
171175
if [ "${i}" -eq "$(( max_retries - 1 ))" ]; then

0 commit comments

Comments
 (0)