How do you produce SBOMs and attach them to a release?
IntermediateConceptDebugging, Cost, Monorepos & Releases
Answer
- uses: anchore/sbom-action@v0
with:
image: ${{ env.IMAGE }}@${{ needs.build.outputs.digest }}
format: spdx-json
output-file: sbom.spdx.json
- run: gh release upload "$GITHUB_REF_NAME" sbom.spdx.json
env:
GH_TOKEN: ${{ github.token }}
For stronger guarantees, attach the SBOM as an attestation (actions/attest-sbom) so consumers can verify who produced it. Trivy can generate SBOMs too (trivy image --format cyclonedx).
More on Debugging, Cost, Monorepos & Releases
How do you enable debug logging, and what does each flag show?BeginnerWhat tools help you inspect a run from the terminal?BeginnerHow is GitHub Actions billed for private repos, and what are the multipliers?IntermediateName the top ways to reduce Actions minutes and wall-clock time.IntermediateHow do you build only the services that changed in a monorepo?AdvancedWhy are workflow-level `paths` filters problematic with required checks, and what is the fix?Intermediate