Skip to content

Commit dfe10b1

Browse files
authored
fix(ci): Restore push of sbom to GitHub release (#1797)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent 9fe60f5 commit dfe10b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,14 @@ jobs:
109109
for entry in $images; do
110110
# exclude latest tag
111111
if [[ $entry != *latest ]]; then
112-
syft -o cyclonedx-json=/tmp/sbom.cyclonedx.json $entry
112+
material_name="$(echo $entry | sed 's#.*/##')"
113+
114+
syft -o cyclonedx-json=/tmp/sbom-$material_name.cyclonedx.json $entry
113115
chainloop attestation add --value $entry --kind CONTAINER_IMAGE --attestation-id ${{ env.ATTESTATION_ID }}
114-
chainloop attestation add --value /tmp/sbom.cyclonedx.json --attestation-id ${{ env.ATTESTATION_ID }}
116+
chainloop attestation add --value /tmp/sbom-$material_name.cyclonedx.json --kind SBOM_CYCLONEDX_JSON --attestation-id ${{ env.ATTESTATION_ID }}
115117
116118
# Upload the SBOM to the release
117-
# gh release upload ${{ github.ref_name }} /tmp/sbom-$material_name.cyclonedx.json --clobber
119+
gh release upload ${{ github.ref_name }} /tmp/sbom-$material_name.cyclonedx.json --clobber
118120
fi
119121
done
120122

0 commit comments

Comments
 (0)