Skip to content

Commit 9f766f7

Browse files
committed
CI: sync generate-srcinfo from MSYS2-packages
for sbom generation changes
1 parent 1c4691c commit 9f766f7

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

.github/workflows/generate-srcinfo.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,22 @@ jobs:
3636
msystem: MSYS
3737
update: true
3838

39-
- name: Download srcinfo.json.gz/pypi.json.gz and set up the environment
39+
- name: Download srcinfo.json.gz and set up the environment
4040
shell: msys2 {0}
4141
run: |
4242
# makepkg requires strip in PATH even if it wont be used
4343
touch /usr/bin/strip.exe
4444
curl --fail -L --retry 5 -o srcinfo.json.gz "https://github.com/$GITHUB_REPOSITORY/releases/download/srcinfo-cache/srcinfo.json.gz"
45-
curl --fail -L --retry 5 -o pypi.json.gz "https://github.com/$GITHUB_REPOSITORY/releases/download/srcinfo-cache/pypi.json.gz" || true
4645
4746
- name: Parse PKGBUILDs and update srcinfo.json.gz
4847
run: |
4948
msys2-srcinfo-cache --time-limit 19800 mingw '${{ steps.msys2.outputs.msys2-location }}' . srcinfo.json.gz
5049
51-
- name: Update the PyPI cache
52-
run: |
53-
msys2-pypi-cache srcinfo.json.gz pypi.json.gz
54-
55-
- name: Generate SBOM
56-
run: |
57-
msys2-sbom srcinfo.json.gz sbom.cdx.json
58-
5950
- uses: actions/upload-artifact@v4
6051
with:
6152
name: result-win
6253
path: |
6354
srcinfo.json.gz
64-
pypi.json.gz
65-
sbom.cdx.json
6655
6756
update-srcinfo-linux:
6857
needs: update-srcinfo-win
@@ -72,15 +61,33 @@ jobs:
7261
with:
7362
name: result-win
7463

64+
- uses: actions/setup-python@v5
65+
id: setup-python
66+
with:
67+
python-version: '3.11'
68+
69+
- name: Install dependencies
70+
run: |
71+
pipx install --python '${{ steps.setup-python.outputs.python-path }}' git+https://github.com/msys2/msys2-devtools
72+
73+
- name: Update the PyPI cache
74+
run: |
75+
curl --fail -L --retry 5 -o pypi.json.gz "https://github.com/$GITHUB_REPOSITORY/releases/download/srcinfo-cache/pypi.json.gz" || true
76+
msys2-pypi-cache srcinfo.json.gz pypi.json.gz
77+
7578
- name: Update vulnerability database
7679
run: |
80+
msys2-sbom create srcinfo.json.gz sbom.cdx.json
7781
curl --retry 5 -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s --
7882
./bin/grype sbom:sbom.cdx.json -o cyclonedx-json --file sbom.vuln.cdx.json
83+
msys2-sbom merge sbom.cdx.json sbom.vuln.cdx.json
7984
8085
- uses: actions/upload-artifact@v4
8186
with:
8287
name: result-linux
8388
path: |
89+
pypi.json.gz
90+
sbom.cdx.json
8491
sbom.vuln.cdx.json
8592
8693
upload-srcinfo:

0 commit comments

Comments
 (0)