File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,18 +9,22 @@ inputs:
99outputs :
1010 sbom-path :
1111 description : The path to the generated SBOM file
12- value : ${{ steps.path .outputs.OUTPUT_PATH }}
12+ value : ${{ steps.generate-sbom .outputs.OUTPUT_PATH }}
1313
1414runs :
1515 using : " composite"
1616 steps :
17- - name : Set path for SBOM
18- id : path
19- shell : bash
20- run : echo "OUTPUT_PATH=$(mktemp -d)/sbom.json" >> $GITHUB_OUTPUT
17+ - name : Setup Syft
18+ id : setup-syft
19+ uses : anchore/sbom-action/download-syft@f8bdd1d8ac5e901a77a92f111440fdb1b593736b # v0
2120
22- - uses : anchore/sbom-action@v0
23- with :
24- image : ${{ inputs.image-ref }}
25- output-file : ${{ steps.path.outputs.OUTPUT_PATH }}
26- format : spdx-json
21+ - name : Generate SBOM
22+ id : generate-sbom
23+ env :
24+ SYFT_CMD : ${{ steps.setup-syft.outputs.cmd }}
25+ shell : bash
26+ run : |
27+ OUTPUT_PATH="`$(mktemp -d)/sbom.json`"
28+ export SYFT_PARALLELISM=$(($(nproc)*2))
29+ $SYFT_CMD ${{ inputs.image-ref }} --select-catalogers "rpm,+sbom-cataloger" -o spdx-json=${OUTPUT_PATH}
30+ echo "OUTPUT_PATH=${OUTPUT_PATH}" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments