Skip to content

Commit

Permalink
feat(workflows): Include attestation URL to release workflow (chainlo…
Browse files Browse the repository at this point in the history
…op-dev#838)

Signed-off-by: Javier Rodriguez <[email protected]>
  • Loading branch information
javirln authored May 28, 2024
1 parent 7052e4a commit a0be0ce
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ jobs:
chainloop attestation add --value "/tmp/chainloop-$version.tar.gz"
- name: Finish and Record Attestation
id: attestation-push
if: ${{ success() }}
run: |
chainloop attestation status --full
chainloop attestation push --key env://CHAINLOOP_SIGNING_KEY
attestation_sha=$(chainloop attestation push --key env://CHAINLOOP_SIGNING_KEY -o json | jq -r '.digest')
echo "attestation_sha=$attestation_sha" >> $GITHUB_OUTPUT
env:
CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
CHAINLOOP_SIGNING_KEY: ${{ secrets.COSIGN_KEY }}
Expand All @@ -72,3 +74,13 @@ jobs:
if: ${{ cancelled() }}
run: |
chainloop attestation reset --trigger cancellation
- name: Add attestation link to release notes
if: ${{ success() }}
run: |
chainloop_release_url="## Chainloop Attestation"$'\n'"[View the attestation of this release](https://app.chainloop.dev/attestation/${{ steps.attestation-push.outputs.attestation_sha }})"
current_notes=$(gh release view ${{ github.ref }} --json body -q '.body')
modified_notes="$chainloop_release_url"$'\n\n'"$current_notes"
gh release edit ${{ github.ref }} -n "$modified_notes"

0 comments on commit a0be0ce

Please sign in to comment.