Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(workflows): Include attestation URL to release workflow #838

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: Edit the release notes with attestation link
javirln marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ success() }}
run: |
chainloop_release_url="## Chainloop Attestation"$'\n'"View the attestation of this release at: https://app.chainloop.dev/attestation/${{ steps.attestation-push.outputs.attestation_sha }}"
javirln marked this conversation as resolved.
Show resolved Hide resolved
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"
Loading