SLSA Provenance #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SLSA Provenance | |
on: | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
build: | |
name: Build | |
runs-on: macos-latest | |
outputs: | |
hashes: "${{ steps.hashes.outputs.hashes }}" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- name: Install dependencies | |
run: brew install popt | |
- name: Generate build artifact | |
run: | | |
cmake -S . -B build | |
cmake --build build | |
- id: hashes | |
name: Generate hashes | |
run: | | |
echo "hashes=$(sha256sum build/src/flog | base64 -w0)" >> "$GITHUB_OUTPUT" | |
- name: Upload build artifact | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: flog | |
path: build/src/flog | |
if-no-files-found: error | |
retention-days: 7 | |
provenance: | |
needs: [build] | |
permissions: | |
actions: read | |
id-token: write | |
contents: write | |
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] # Must specify version tag; see https://github.com/slsa-framework/slsa-verifier/issues/12 | |
with: | |
base64-subjects: "${{ needs.build.outputs.hashes }}" |