Skip to content

Commit 16a8a24

Browse files
Generate sbom only on requirements.txt & updated path for trigger
1 parent 475e1c1 commit 16a8a24

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/sbom.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ on:
1111
branches: ['master']
1212
paths:
1313
- 'pyproject.toml'
14-
- 'uv.lock'
1514
- 'requirements.txt'
16-
- 'requirements/**/*.txt'
1715

1816
permissions:
1917
contents: write
@@ -33,19 +31,18 @@ jobs:
3331
with:
3432
persist-credentials: false
3533

36-
- name: Install uv
37-
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
3836
with:
39-
enable-cache: true
4037
python-version: "3.10"
4138

42-
- name: Sync dependencies
43-
run: |
44-
uv venv .venv
45-
uv sync --all-groups
46-
4739
- name: Generate SBOM
48-
run: npx @cyclonedx/cdxgen -t python --python-path .venv/bin/python --json-pretty -o sbom.json
40+
run: |
41+
python -m venv .venv
42+
source .venv/bin/activate
43+
pip install -r requirements.txt
44+
pip install .
45+
npx cdxgen -t python --exclude "uv.lock" --exclude "requirements/**" --exclude "requirements.txt" --spec-version 1.5 --json-pretty -o sbom.json
4946
env:
5047
FETCH_LICENSE: true
5148

0 commit comments

Comments
 (0)