File tree Expand file tree Collapse file tree 1 file changed +1
-33
lines changed
Expand file tree Collapse file tree 1 file changed +1
-33
lines changed Original file line number Diff line number Diff line change 6161 actions : read # To read the workflow path.
6262 id-token : write # To sign the provenance.
6363 contents : write # To add assets to a release.
64- uses :
slsa-framework/slsa-github-generator/.github/workflows/[email protected] 64+ uses :
slsa-framework/slsa-github-generator/.github/workflows/[email protected] # not pinned to avoid breaking it, use it to target refs/tags/vX.Y.Z 6565 with :
6666 base64-subjects : " ${{ needs.goreleaser.outputs.hashes }}"
6767 upload-assets : true # upload to a new release
68- verification :
69- needs : [goreleaser, provenance]
70- runs-on : ubuntu-latest
71- permissions : read-all
72- steps :
73- - name : Install the verifier
74- uses : slsa-framework/slsa-verifier/actions/installer@eb7007070baa04976cb9e25a0d8034f8db030a86 # v2.5.1
75-
76- - name : Download assets
77- env :
78- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
79- PROVENANCE : " ${{ needs.provenance.outputs.provenance-name }}"
80- run : |
81- set -euo pipefail
82- gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "*.tar.gz"
83- gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "*.sbom"
84- gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "$PROVENANCE"
85- - name : Verify assets
86- env :
87- CHECKSUMS : ${{ needs.goreleaser.outputs.hashes }}
88- PROVENANCE : " ${{ needs.provenance.outputs.provenance-name }}"
89- run : |
90- set -euo pipefail
91- checksums=$(echo "$CHECKSUMS" | base64 -d)
92- while read -r line; do
93- fn=$(echo $line | cut -d ' ' -f2)
94- echo "Verifying $fn"
95- slsa-verifier verify-artifact --provenance-path "$PROVENANCE" \
96- --source-uri "github.com/$GITHUB_REPOSITORY" \
97- --source-tag "$GITHUB_REF_NAME" \
98- "$fn"
99- done <<<"$checksums"
You can’t perform that action at this time.
0 commit comments