Skip to content

Commit

Permalink
Add attestation with sbom
Browse files Browse the repository at this point in the history
Signed-off-by: C0D3 M4513R <[email protected]>
  • Loading branch information
C0D3-M4513R committed Jun 14, 2024
1 parent 5a085cf commit 195304f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ on:
branches: [main]
permissions:
contents: write
id-token: write
attestations: write
actions: read

jobs:
create-release:
needs:
- build
- nixbuild
- create-sbom
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
steps:
Expand All @@ -37,6 +41,13 @@ jobs:
done
rm -r "${dir}"
done
mv artifacts/sbom.spdx.json sbom.spdx.json
- uses: actions/attest-sbom@v1
with:
subject-path: artifacts/*
subject-name: "counter@${{ github.ref_name }}"
sbom-path: "sbom.spdx.json"
push-to-registry: false
- name: release
uses: ncipollo/release-action@v1
id: create_release
Expand All @@ -53,6 +64,13 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@v3
- run: nix-build
- run: nix-shell --run "echo OK"
create-sbom:
runs-on: ubuntu-lastest
steps:
- uses: anchore/sbom-action@v0
with:
artifact-name: "sbom.spdx.json"
output-file: "sbom.spdx.json"
build:
runs-on: ${{ matrix.os }}
strategy:
Expand Down

0 comments on commit 195304f

Please sign in to comment.