File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Dependency Track SBOM Upload
2+
3+ on :
4+ push :
5+ branches :
6+ - develop
7+ workflow_dispatch :
8+
9+ jobs :
10+ dependency-track :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout Repository
15+ uses : actions/checkout@v4
16+
17+ - name : Setup Node.js
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : ' 18'
21+
22+ - name : Install CycloneDX
23+ run : npm install -g @cyclonedx/cyclonedx-npm
24+
25+ - name : Generate SBOM
26+ run : cyclonedx-npm --output-file bom.xml
27+
28+ - name : Upload SBOM to Dependency Track
29+ run : |
30+ curl -X POST "https://dep-tracker.laerdal.com/api/api/v1/bom" \
31+ -H "X-Api-Key: ${{ secrets.DEPENDENCY_TRACK_API_KEY }}" \
32+ -H "Content-Type: multipart/form-data" \
33+ -F "project=2d939b62-41f9-4b70-9a4e-ac9416fbe4d1" \
34+ -F "bom=@bom.xml"
You can’t perform that action at this time.
0 commit comments