Skip to content

Commit bd81f12

Browse files
committed
ci: simplify SBOM generation using buildx native support
Remove manual SBOM extraction and ORAS attachment steps by leveraging buildx's native SBOM generation capability via the `sbom: true` flag.
1 parent fa1516e commit bd81f12

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

.github/workflows/build-and-deploy.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,24 +62,8 @@ jobs:
6262
with:
6363
context: .
6464
push: true
65-
load: true
65+
sbom: true
6666
tags: ${{ steps.meta.outputs.tags }}
6767
labels: ${{ steps.meta.outputs.labels }}
6868
build-args: |
6969
SQUID_VERSION=${{ steps.get_version.outputs.VERSION }}
70-
71-
- name: Extract SBOM
72-
run: |
73-
docker create --name temp-container "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build_and_push.outputs.digest }}"
74-
docker cp temp-container:/sbom.spdx.json ./sbom.spdx.json
75-
docker rm temp-container
76-
- name: Install ORAS
77-
uses: oras-project/setup-oras@v1
78-
79-
- name: Attach SBOM (oras)
80-
run: |
81-
oras attach \
82-
--artifact-type application/spdx+json \
83-
--distribution-spec v1.1-referrers-api \
84-
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build_and_push.outputs.digest }}" \
85-
./sbom.spdx.json:application/spdx+json

0 commit comments

Comments
 (0)