Skip to content

Commit

Permalink
ci: log cosign attest verification to file to release pipeline remove…
Browse files Browse the repository at this point in the history
… hangs (#2975)
  • Loading branch information
mowies committed Feb 7, 2024
1 parent 7673b7f commit 11b81a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ spanhandler
spanid
spanitem
spdx
spdxjson
spf
squidfunk
sre
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,21 @@ jobs:
env:
IMAGE_DIGEST: ${{ steps.docker_build_image.outputs.digest }}
run: |
cosign attest --yes --type spdx --predicate ./sbom-${{ matrix.config.name }}.spdx.json ${{ env.IMAGE_NAME }}@${{ env.IMAGE_DIGEST }}
echo "Attesting SBOM for this release and image..."
cosign attest --yes --type spdxjson --predicate ./sbom-${{ matrix.config.name }}.spdx.json ${{ env.IMAGE_NAME }}@${{ env.IMAGE_DIGEST }}
echo "Verifying that the attestation worked..."
cosign verify-attestation --type spdx \
--certificate-identity-regexp="https://github.com/keptn/lifecycle-toolkit/.*" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
--output-file ./cosign-attest-output.json
${{ env.IMAGE_NAME }}@${{ env.IMAGE_DIGEST }}
echo "Result of verification:"
- name: Upload verification log as artifact
uses: actions/upload-artifact@v3
with:
name: cosign-attest-verification-log
path: ./cosign-attest-output.json

update-examples:
name: Update examples
Expand Down

0 comments on commit 11b81a0

Please sign in to comment.