Skip to content

Commit 33a66fd

Browse files
committed
Move sbom job before others that need it
1 parent 59e5883 commit 33a66fd

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
@@ -41,6 +41,33 @@ env:
4141
FORCE_COLOR: 1
4242

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

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

0 commit comments

Comments
 (0)