Skip to content

Commit 93754e1

Browse files
committed
Reapply "ci: add generating sbom to build workflow (#201)"
This reverts commit 33ed45d.
1 parent 33ed45d commit 93754e1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/build.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,25 @@ jobs:
6464
run: |
6565
make
6666
67+
- name: Generate SBOM for binary
68+
uses: anchore/sbom-action@v0
69+
env:
70+
SBOM_NAME: sbom.json
71+
with:
72+
path: ./bin/
73+
format: spdx-json
74+
artifact-name: ${{ env.SBOM_NAME }}
75+
output-file: ./bin/${{ env.SBOM_NAME }}1
76+
77+
- name: Set up Docker Buildx
78+
uses: docker/setup-buildx-action@v3
79+
6780
- name: Push Docker image
68-
uses: docker/build-push-action@v5
81+
uses: docker/build-push-action@v6
6982
with:
7083
context: .
7184
push: true
85+
sbom: true
7286
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }}
7387

7488
- name: Upload image tarballs to GCS
@@ -83,6 +97,7 @@ jobs:
8397
token: ${{ secrets.GITHUB_TOKEN }}
8498
files: |
8599
bin/firewall-controller*
100+
bin/sbom.json
86101
if: ${{ github.event_name == 'release' }}
87102

88103
test:

0 commit comments

Comments
 (0)