Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Updated SLSA provenance generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnabRollin committed Oct 17, 2023
1 parent f159fe6 commit 2bd3c1b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/generator-generic-ossf-slsa3-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ jobs:
# Step 1: Build your artifacts.
#
# ========================================================
- name: Build artifacts
- name: Build artifacts using cargo
run: |
# These are some amazing artifacts.
echo "artifact1" > artifact1
echo "artifact2" > artifact2
cargo build --release
cp target/release/dwn .
# ========================================================
#
Expand All @@ -49,18 +48,16 @@ jobs:
run: |
set -euo pipefail
# List the artifacts the provenance will refer to.
files=$(ls artifact*)
# Generate the subjects (base64 encoded).
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
echo "hashes=$(sha256sum dwn | base64 -w0)" >> "${GITHUB_OUTPUT}"
provenance:
needs: [build]
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.4.0
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0
with:
base64-subjects: "${{ needs.build.outputs.digests }}"
upload-assets: true # Optional: Upload to a new release

0 comments on commit 2bd3c1b

Please sign in to comment.