Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attestation with sbom #3

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add attestation with sbom
Signed-off-by: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com>
  • Loading branch information
C0D3-M4513R committed Jun 10, 2024
commit 50625b1bde1e6a7e3af9aefc5241611976d8193b
23 changes: 23 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
branches: [main]
permissions:
contents: write
id-token: write
attestations: write
actions: read

jobs:
create-release:
Expand Down Expand Up @@ -101,6 +104,26 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.4
- name: Run build
run: cargo build --target ${{ matrix.target }} --release --package ${{ matrix.package }} --bin ${{ matrix.package }}
- uses: anchore/sbom-action@v0
with:
artifact-name: "${{ matrix.package }}-${{ matrix.name }}-sbom.spdx.json"
output-file: "${{ matrix.package }}-${{ matrix.name }}-sbom.spdx.json"
- uses: actions/attest-sbom@v1
with:
subject-path: |
target/${{ matrix.target }}/release/${{ matrix.package }}
target/${{ matrix.target }}/release/${{ matrix.package }}.exe
!target/${{ matrix.target }}/release/deps
!target/${{ matrix.target }}/release/build
!target/${{ matrix.target }}/release/.fingerprint
!target/${{ matrix.target }}/release/examples
!target/${{ matrix.target }}/release/incremental
!target/${{ matrix.target }}/release/.cargo-lock
!target/${{ matrix.target }}/release/*.d
!target/${{ matrix.target }}/release/*.pdb
subject-name: "${{ matrix.package }}-${{ matrix.name }}"
sbom-path: "${{ matrix.package }}-${{ matrix.name }}-sbom.spdx.json"
push-to-registry: false
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
Expand Down
Loading