10.0.4 #5
Workflow file for this run
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: Generate SBOM on release | |
on: | |
release: | |
types: [published] | |
jobs: | |
generate-src-sbom: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Parse release tag | |
run: echo RELEASE_TAG=$(echo $GITHUB_REF | cut -d '/' -f 3) | tee -a $GITHUB_ENV | |
- name: Set output filename | |
run: echo SBOM_OUTPUT_FILE="${{ github.event.repository.name }}-${{ env.RELEASE_TAG }}-sbom.spdx.json" | tee -a $GITHUB_ENV | |
- name: Generate SBOM | |
uses: anchore/sbom-action@v0 | |
with: | |
# Setting path to null works around this bug: | |
# https://github.com/anchore/sbom-action/issues/389 | |
path: null | |
file: go.mod | |
format: spdx-json | |
output-file: ${{ env.SBOM_OUTPUT_FILE }} | |
artifact-name: ${{ env.SBOM_OUTPUT_FILE }} |