@@ -33,37 +33,53 @@ jobs:
33
33
id-token : write
34
34
steps :
35
35
- uses : actions/checkout@v4
36
+
36
37
- name : Set up Python
37
38
uses : actions/setup-python@v5
38
39
with :
39
40
python-version : ' 3.11'
41
+
40
42
- name : Set up Node.js
41
43
uses : actions/setup-node@v3
42
44
with :
43
45
node-version : ' 20'
46
+
44
47
- name : Install dependencies
45
48
run : |
46
49
python3 -m pip install --upgrade pip
47
50
python3 -m pip install setuptools wheel twine build
48
- - name : Create Release
49
- id : create_release
50
- if : startsWith(github.ref, 'refs/tags/')
51
- uses : softprops/action-gh-release@v1
52
- env :
53
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
+
54
52
- name : Build
55
53
run : |
56
54
python3 -m build
55
+
57
56
- name : Publish package distributions to PyPI
58
57
if : startsWith(github.ref, 'refs/tags/')
59
58
uses : pypa/gh-action-pypi-publish@release/v1
59
+
60
60
- name : Setup nydus
61
61
run : |
62
62
curl -LO https://github.com/dragonflyoss/nydus/releases/download/v2.2.4/nydus-static-v2.2.4-linux-amd64.tgz
63
63
tar -xvf nydus-static-v2.2.4-linux-amd64.tgz
64
64
chmod +x nydus-static/*
65
65
mv nydus-static/* /usr/local/bin/
66
66
rm -rf nydus-static-v2.2.4-linux-amd64.tgz nydus-static
67
+
68
+ - name : Generate SBOM with cdxgen
69
+ run : |
70
+ npm install -g @cyclonedx/cdxgen
71
+ cdxgen -t python -o bom.json . --profile research
72
+
73
+ - name : Create Release
74
+ id : create_release
75
+ if : startsWith(github.ref, 'refs/tags/')
76
+ uses : softprops/action-gh-release@v2
77
+ with :
78
+ files : |
79
+ bom.json
80
+ env :
81
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82
+
67
83
- name : Set up QEMU
68
84
uses : docker/setup-qemu-action@v3
69
85
- name : Set up Docker Buildx
94
110
labels : ${{ steps.meta.outputs.labels }}
95
111
cache-from : type=gha,scope=depscan
96
112
cache-to : type=gha,mode=max,scope=depscan
113
+
97
114
- name : nydusify
98
115
run : |
99
116
nydusify convert --oci --oci-ref --source ghcr.io/owasp-dep-scan/depscan:master --target ghcr.io/owasp-dep-scan/depscan:master-nydus --prefetch-dir /opt/dep-scan
0 commit comments