Skip to content

Commit 8ba9e1b

Browse files
authored
Create sbom.yml
1 parent 0615bc9 commit 8ba9e1b

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

‎.github/workflows/sbom.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Generate SBOM
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v6
19+
- name: Set up Python 3.x
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: "3.x"
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install cyclonedx-bom
27+
- name: Create output directory
28+
run: |
29+
mkdir ~/output
30+
31+
- name: Generate SBOM
32+
working-directory: ./
33+
run: |
34+
python -m cyclonedx_py requirements > ~/output/sbom.json
35+
36+
- uses: actions/upload-artifact@v6
37+
with:
38+
name: SBOM
39+
path: ~/output/

0 commit comments

Comments
 (0)