Skip to content

Commit 39b06a4

Browse files
ci: preserve immutable release provenance
1 parent 0ee202c commit 39b06a4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ jobs:
7777
fi
7878
7979
VERSION="${TAG#v}"
80+
RELEASE_SHA="$(git rev-list -n 1 "$TAG")"
8081
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
8182
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
83+
echo "release_sha=$RELEASE_SHA" >> "$GITHUB_OUTPUT"
8284
8385
- name: Check out tagged source
8486
run: git checkout --detach "${{ steps.version.outputs.tag }}"
@@ -125,7 +127,7 @@ jobs:
125127
labels: |
126128
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
127129
org.opencontainers.image.version=${{ steps.version.outputs.tag }}
128-
org.opencontainers.image.revision=${{ github.sha }}
130+
org.opencontainers.image.revision=${{ steps.version.outputs.release_sha }}
129131
130132
- name: Create or repair GitHub Release
131133
shell: bash
@@ -149,6 +151,7 @@ jobs:
149151
- name: Publish release summary
150152
run: |
151153
echo "### DeepSequence Recommender ${{ steps.version.outputs.tag }}" >> "$GITHUB_STEP_SUMMARY"
154+
echo "- Release commit: \`${{ steps.version.outputs.release_sha }}\`" >> "$GITHUB_STEP_SUMMARY"
152155
echo "- GitHub Release: published/repaired" >> "$GITHUB_STEP_SUMMARY"
153156
echo "- GHCR: \`${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }}\`" >> "$GITHUB_STEP_SUMMARY"
154157
echo "- Image digest: \`${{ steps.push.outputs.digest }}\`" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)