File tree Expand file tree Collapse file tree 2 files changed +22
-22
lines changed
Expand file tree Collapse file tree 2 files changed +22
-22
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 }}-sbom | 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 }}:dev \
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@v4
81- with :
82- name : ${{ steps.derive-artifact-name.outputs.SBOM_ARTIFACT_NAME }}
83- path : ${{ steps.derive-artifact-name.outputs.SBOM_DIR }}
84-
8563 - name : Generate artifact attestation
8664 uses : actions/attest-build-provenance@v1
8765 with :
Original file line number Diff line number Diff line change @@ -110,6 +110,28 @@ jobs:
110110 tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag-action.outputs.tag }}
111111 labels : ${{ steps.meta.outputs.labels }}
112112
113+ - name : Derive SBOM artifact name
114+ id : derive-artifact-name
115+ shell : bash
116+ run : |
117+ # These are outputs (not vars) so that they can be used as input to the upload step
118+ echo "SBOM_ARTIFACT_NAME=$(echo ${{ env.IMAGE_NAME }}-public-sbom | sed 's/\//_/g')" >> $GITHUB_OUTPUT
119+ echo "SBOM_DIR=./sbom" >> $GITHUB_OUTPUT
120+
121+ - name : Generate SBOM artifact
122+ run : |
123+ curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s --
124+ ./bin/syft --version
125+ ./bin/syft ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag-action.outputs.tag }} \
126+ --scope "all-layers" \
127+ --output "cyclonedx-json=${{ steps.derive-artifact-name.outputs.SBOM_DIR }}/${{ steps.derive-artifact-name.outputs.SBOM_ARTIFACT_NAME }}"
128+
129+ - name : Upload SBOM
130+ uses : actions/upload-artifact@v4
131+ with :
132+ name : ${{ steps.derive-artifact-name.outputs.SBOM_ARTIFACT_NAME }}
133+ path : ${{ steps.derive-artifact-name.outputs.SBOM_DIR }}
134+
113135 - name : Generate artifact attestation
114136 uses : actions/attest-build-provenance@v1
115137 if : (steps.tag-action.outputs.tag != '')
You can’t perform that action at this time.
0 commit comments