Skip to content

Commit f07920b

Browse files
committed
use gh slsa provenance and upload it with cosign
1 parent cc944ad commit f07920b

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/build-attest.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@ jobs:
8484
--type spdx \
8585
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.push.outputs.digest }}
8686
87-
- name: Generate and attest SLSA provenance with Cosign
87+
- name: Generate SLSA provenance with GitHub action
88+
uses: actions/attest-build-provenance/predicate@v3
89+
id: provenance
90+
91+
- name: Attest SLSA provenance with Cosign
8892
run: |
93+
echo '${{ steps.provenance.outputs.predicate }}' > provenance.json
8994
cosign attest --yes \
90-
--predicate <(cosign generate-slsa-provenance \
91-
--repo ${{ github.repository }} \
92-
--run-id ${{ github.run_id }} \
93-
--sha ${{ github.sha }}) \
94-
--type slsaprovenance \
95+
--predicate provenance.json \
96+
--type slsaprovenance1 \
9597
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.push.outputs.digest }}

0 commit comments

Comments
 (0)