Skip to content

Commit 3b755d1

Browse files
authored
Generate SBOM correctly for different platforms/variants (#2319)
1 parent 2154366 commit 3b755d1

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

.github/actions/apply-single-tags/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ runs:
3939
--tags-dir /tmp/jupyter/tags/
4040
shell: bash
4141

42+
- name: Upload SBOM for the image 🧾
43+
uses: anchore/sbom-action@f8bdd1d8ac5e901a77a92f111440fdb1b593736b # v0.20.6
44+
with:
45+
image: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}
46+
artifact-name: ${{ inputs.image }}-${{ inputs.platform }}-${{ inputs.variant }}-sbom.spdx.json
47+
upload-artifact-retention: 40
48+
4249
# This step is needed to prevent pushing non-multi-arch "latest" tag
4350
- name: Remove the "latest" tag from the image 🗑️
4451
run: docker image rmi ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}:latest

.github/workflows/docker-tag-push.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ jobs:
7575
shell: bash
7676
id: login
7777

78-
- name: Generate SBOM for the image 🧾
79-
uses: anchore/sbom-action@f8bdd1d8ac5e901a77a92f111440fdb1b593736b # v0.20.6
80-
with:
81-
image: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ inputs.image }}
82-
output-file: /tmp/sbom.txt
83-
84-
- name: Upload SBOM 💾
85-
uses: actions/upload-artifact@v4
86-
with:
87-
name: ${{ inputs.image }}-sbom
88-
path: /tmp/sbom.txt
89-
retention-days: 40
90-
9178
- name: Push single platform images to Registry 📤
9279
if: env.PUSH_TO_REGISTRY == 'true'
9380
run: |

0 commit comments

Comments
 (0)