Skip to content

Commit df0b766

Browse files
committed
Move sbom job before others that need it
1 parent 426eaaa commit df0b766

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,33 @@ env:
4040
FORCE_COLOR: 1
4141

4242
jobs:
43+
sbom:
44+
if: github.event_name != 'schedule' || github.event.repository.fork == false
45+
runs-on: ubuntu-latest
46+
name: Generate SBOM
47+
steps:
48+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
49+
with:
50+
persist-credentials: false
51+
52+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
53+
with:
54+
python-version: "3.x"
55+
56+
- name: Generate CycloneDX SBOM
57+
run: python3 .github/generate-sbom.py
58+
59+
- name: Validate SBOM
60+
run: |
61+
python3 -m pip install -r .ci/requirements-sbom.txt
62+
check-jsonschema --schemafile "https://raw.githubusercontent.com/CycloneDX/specification/1.7/schema/bom-1.7.schema.json" pillow-*.cdx.json
63+
64+
- name: Upload SBOM as workflow artifact
65+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
66+
with:
67+
name: sbom
68+
path: "pillow-*.cdx.json"
69+
4370
build-native-wheels:
4471
needs: sbom
4572
if: github.event_name != 'schedule' || github.event.repository.fork == false
@@ -318,33 +345,6 @@ jobs:
318345
artifacts_path: dist
319346
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
320347

321-
sbom:
322-
if: github.event_name != 'schedule' || github.event.repository.fork == false
323-
runs-on: ubuntu-latest
324-
name: Generate SBOM
325-
steps:
326-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
327-
with:
328-
persist-credentials: false
329-
330-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
331-
with:
332-
python-version: "3.x"
333-
334-
- name: Generate CycloneDX SBOM
335-
run: python3 .github/generate-sbom.py
336-
337-
- name: Validate SBOM
338-
run: |
339-
python3 -m pip install -r .ci/requirements-sbom.txt
340-
check-jsonschema --schemafile "https://raw.githubusercontent.com/CycloneDX/specification/1.7/schema/bom-1.7.schema.json" pillow-*.cdx.json
341-
342-
- name: Upload SBOM as workflow artifact
343-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
344-
with:
345-
name: sbom
346-
path: "pillow-*.cdx.json"
347-
348348
sbom-publish:
349349
if: |
350350
github.event.repository.fork == false

0 commit comments

Comments
 (0)