File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 token : ${{ secrets.GITHUB_TOKEN }}
4444 npm_token : ${{ secrets.NPM_TOKEN }}
4545 path : ./dist/angular-datagrid
46+
47+ sbom :
48+ needs : build
49+ runs-on : ubuntu-latest
50+ steps :
51+ - uses : actions/checkout@v5
52+ - name : Generate SBOM (SPDX)
53+ uses : anchore/sbom-action@v0
54+ with :
55+ path : .
56+ format : spdx-json
57+ output-file : sbom.spdx.json
58+ upload-artifact : false
59+ - name : Generate SBOM (CycloneDX)
60+ uses : anchore/sbom-action@v0
61+ with :
62+ path : .
63+ format : cyclonedx-json
64+ output-file : sbom.cdx.json
65+ upload-artifact : false
66+ - name : Upload SBOM to release
67+ env :
68+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69+ run : |
70+ VERSION=$(node -p "require('./package.json').version")
71+ TAG="v${VERSION}"
72+ if gh release view "$TAG" > /dev/null 2>&1; then
73+ gh release upload "$TAG" sbom.spdx.json sbom.cdx.json --clobber
74+ else
75+ echo "No release found for $TAG, skipping SBOM upload"
76+ fi
You can’t perform that action at this time.
0 commit comments