File tree 2 files changed +31
-1
lines changed
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 41
41
run : >
42
42
docker save shell-ui:v$SHELL_UI_VERSION |
43
43
gzip > shell-ui.tar.gz
44
+ - name : Install syft tool to build the sbom
45
+ run : |
46
+ SYFT_VERSION="1.19.0"
47
+ SYFT_INSTALLER="syft_${SYFT_VERSION}_linux_amd64.deb"
48
+ SYFT_CHECKSUM="f3667d6abfa97a1e5614882f81e0a0b090f0047e0df7025b568fa87b6d95ac58"
49
+ wget https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/${SYFT_INSTALLER}
50
+ ACTUAL_CHECKSUM=$(sha256sum ${SYFT_INSTALLER} | cut -d ' ' -f1)
51
+ if [ "$ACTUAL_CHECKSUM" != "$SYFT_CHECKSUM" ]; then
52
+ echo "ERROR: Checksum verification failed for ${SYFT_INSTALLER}"
53
+ echo "Expected: ${SYFT_CHECKSUM}"
54
+ echo "Got: ${ACTUAL_CHECKSUM}"
55
+ exit 1
56
+ fi
57
+ sudo dpkg -i ${SYFT_INSTALLER}
58
+ - name : " build Software Bill of materials (SBOM)"
59
+ run : |
60
+ set -x
61
+ cd shell-ui
62
+ syft scan dir:./ --source-name=shell-ui --source-version "$SHELL_UI_VERSION" --output cyclonedx-json=../shell.tar.sbom.spdx.json
63
+
44
64
- name : Prepare artifacts
45
- run : mkdir -p "artifacts/images" && mv shell-ui.tar.gz artifacts/images/ && mv shell.tar artifacts/images/
65
+ run : |
66
+ mkdir -p "artifacts/images"
67
+ mv shell-ui.tar.gz artifacts/images/
68
+ mv shell.tar artifacts/images/
69
+ mv shell.tar.sbom.spdx.json artifacts/images/
70
+
46
71
- name : Upload artifacts
47
72
uses : scality/action-artifacts@v4
48
73
with :
Original file line number Diff line number Diff line change 58
58
run : >
59
59
curl --fail -LO -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }}
60
60
${{ inputs.artifacts-url || steps.artifacts.outputs.link }}/images/shell.tar
61
+ - name : Retrieve shell SBOM from artifacts
62
+ run : >
63
+ curl --fail -LO -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }}
64
+ ${{ inputs.artifacts-url || steps.artifacts.outputs.link }}/images/shell.tar.sbom.spdx.json
61
65
- name : Load shell-ui image
62
66
run : docker load < shell-ui.tar.gz
63
67
- name : Retrieve product.txt from artifacts
@@ -149,5 +153,6 @@ jobs:
149
153
draft : false
150
154
files : |
151
155
shell.tar
156
+ shell.tar.sbom.spdx.json
152
157
env :
153
158
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments