Skip to content

Commit

Permalink
Fix: Use attestation-name output
Browse files Browse the repository at this point in the history
Fixes ko-build#978

Uses the `attestation-name` output from `generator_generic_slsa3.yml` to get the artifact name to download.

Also removes the `compile-generator` input as slsa-framework/slsa-github-generator#1163 was fixed.

Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
  • Loading branch information
ianlewis committed Mar 13, 2023
1 parent e22e7a1 commit 7f8f336
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: goreleaser
on:
push:
tags:
- '*'
- "*"

jobs:
goreleaser:
Expand Down Expand Up @@ -59,14 +59,13 @@ jobs:
provenance:
needs: [goreleaser]
permissions:
actions: read # To read the workflow path.
actions: read # To read the workflow path.
id-token: write # To sign the provenance.
contents: write # To add assets to a release.
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.5.0
with:
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
upload-assets: true
compile-generator: true # Workaround for https://github.com/slsa-framework/slsa-github-generator/issues/1163

verification:
needs: [goreleaser, provenance]
Expand All @@ -93,11 +92,12 @@ jobs:
- name: Download assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROVENANCE: "${{ needs.provenance.outputs.attestation-name }}"
run: |
set -euo pipefail
gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "*.tar.gz"
gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "attestation.intoto.jsonl"
gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" -p "$PROVENANCE"
- name: Verify assets
env:
Expand Down

0 comments on commit 7f8f336

Please sign in to comment.