Skip to content

Commit 87f4267

Browse files
committed
Fix generation of SBOM
1 parent 2b2b701 commit 87f4267

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

.github/actions/sbom/action.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,18 @@ inputs:
99
outputs:
1010
sbom-path:
1111
description: The path to the generated SBOM file
12-
value: ${{ steps.generate-sbom.outputs.OUTPUT_PATH }}
12+
value: ${{ steps.path.outputs.OUTPUT_PATH }}
1313

1414
runs:
1515
using: "composite"
1616
steps:
17-
- name: Setup Syft
18-
id: setup-syft
19-
uses: anchore/sbom-action/download-syft@f8bdd1d8ac5e901a77a92f111440fdb1b593736b # v0
20-
21-
- name: Generate SBOM
22-
id: generate-sbom
23-
env:
24-
SYFT_CMD: ${{ steps.setup-syft.outputs.cmd }}
17+
- name: Set path for SBOM
18+
id: path
2519
shell: bash
26-
run: |
27-
sudo systemctl start podman.socket
20+
run: echo "OUTPUT_PATH=$(mktemp -d)/sbom.json" >> $GITHUB_OUTPUT
2821

29-
OUTPUT_PATH="$(mktemp -d)/sbom.json"
30-
export SYFT_PARALLELISM=$(($(nproc)*2))
31-
sudo $SYFT_CMD ${{ inputs.image-ref }} -o spdx-json=${OUTPUT_PATH}
32-
echo "OUTPUT_PATH=${OUTPUT_PATH}" >> $GITHUB_OUTPUT
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

0 commit comments

Comments
 (0)