Skip to content

Commit b351862

Browse files
Create track_dependencies.yml
1 parent 0daf5a0 commit b351862

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Track Dependencies
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
generate-sbom:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Install CycloneDX
14+
run: |
15+
python -m pip install --upgrade pip
16+
python -m pip install cyclonedx-bom
17+
- name: Install project
18+
run: |
19+
python -m venv .venv
20+
.venv/bin/pip install -r requirements.txt
21+
- name: Generate SBOM file
22+
run: |
23+
cyclonedx-py environment .venv --output-file sbom.json
24+
- name: Upload cyclonedx bom to dependency
25+
uses: DependencyTrack/gh-upload-sbom@v3
26+
with:
27+
serverhostname: ${{ secrets.DEPENDENCY_TRACK_SERVER_HOSTNAME }}
28+
apikey: ${{ secrets.DEPENDENCY_TRACK_API_KEY }}
29+
project: '5494feb7-3a34-458a-96f7-1892b6364dd0'
30+
bomfilename: 'sbom.json'
31+

0 commit comments

Comments
 (0)