File tree Expand file tree Collapse file tree 2 files changed +22
-20
lines changed
Expand file tree Collapse file tree 2 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 6060 tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
6161 labels : ${{ steps.meta.outputs.labels }}
6262
63+ - name : Derive SBOM artifact name
64+ id : derive-artifact-name
65+ shell : bash
66+ run : |
67+ # These are outputs (not vars) so that they can be used as input to the upload step
68+ echo "SBOM_ARTIFACT_NAME=$(echo ${{ env.IMAGE_NAME }} | sed 's/\//_/g')" >> $GITHUB_OUTPUT
69+ echo "SBOM_DIR=./sbom" >> $GITHUB_OUTPUT
70+
71+ - name : Generate SBOM artifact
72+ run : |
73+ curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s --
74+ ./bin/syft --version
75+ ./bin/syft ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag-action.outputs.tag }} \
76+ --scope "all-layers" \
77+ --output "cyclonedx-json=${{ steps.derive-artifact-name.outputs.SBOM_DIR }}/${{ steps.derive-artifact-name.outputs.SBOM_ARTIFACT_NAME }}"
78+
79+ - name : Upload SBOM
80+ uses : actions/upload-artifact@v3
81+ with :
82+ name : ${{ steps.derive-artifact-name.outputs.SBOM_ARTIFACT_NAME }}
83+ path : ${{ steps.derive-artifact-name.outputs.SBOM_DIR }}
84+
6385 - name : Generate artifact attestation
6486 uses : actions/attest-build-provenance@v1
6587 with :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments