chore: add sbom and provenance for docker build

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2024-09-18 21:19:59 +08:00
parent dffcf68a7a
commit 1d58c7e30d
No known key found for this signature in database
GPG Key ID: 647A0EE86907F1AF
1 changed files with 2 additions and 8 deletions

View File

@ -86,6 +86,8 @@ jobs:
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
with: with:
context: . context: .
sbom: true
provenance: true
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}
file: build/images/${{ matrix.module }}/Dockerfile file: build/images/${{ matrix.module }}/Dockerfile
labels: |- labels: |-
@ -124,14 +126,6 @@ jobs:
env: env:
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }} COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
- uses: anchore/sbom-action@v0
with:
image: dragonflyoss/${{ matrix.module }}:${{ steps.get_version.outputs.VERSION }}
- uses: anchore/sbom-action@v0
with:
image: ghcr.io/${{ env.IMAGE_REPOSITORY }}/${{ matrix.module }}:${{ steps.get_version.outputs.VERSION }}
- name: Move cache - name: Move cache
run: | run: |
rm -rf /tmp/.buildx-cache rm -rf /tmp/.buildx-cache