Skip to content

Commit

Permalink
Upload SLSA provenance to existing release (#215)
Browse files Browse the repository at this point in the history
This changes the behavior of the provenance generator to not create a
new release, since goreleaser already does. We add two steps to download
the created provenance and upload it to the existing draft release.

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
  • Loading branch information
haydentherapper authored Jan 13, 2023
1 parent 097a2f1 commit 4314567
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,23 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.4.0
with:
base64-subjects: "${{ needs.release.outputs.hashes }}"
upload-assets: true # upload to a new release
upload-assets: false # do not upload to a new release since goreleaser creates it

release-provenance:
needs: [provenance]
runs-on: ubuntu-latest
permissions:
actions: read # To read the workflow path.
contents: write # To add assets to a release.
steps:
- name: Download the provenance
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{needs.provenance.outputs.provenance-name}}

- name: Release Provenance
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
id: release-provenance
with:
draft: true
files: ${{needs.provenance.outputs.provenance-name}}

0 comments on commit 4314567

Please sign in to comment.