Skip to content

Commit

Permalink
Merge pull request #6 from merlos/fix/multi-platform-docker-build
Browse files Browse the repository at this point in the history
Fix: multi platform docker build & provenance
  • Loading branch information
merlos authored Aug 11, 2024
2 parents 84a63e4 + 1410603 commit eb11572
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Release the Docker image to Docker Hub and GitHub Container Registry
#
# Documentation
# Publish in both docker and ghcr.io
# https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images
# Setting up multi-platform
# https://docs.docker.com/build/ci/github-actions/multi-platform/

#
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
Expand All @@ -26,6 +30,12 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 #3.3.0
with:
Expand Down Expand Up @@ -53,14 +63,16 @@ jobs:
with:
context: .
push: true
sbom: true
provenance: mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: merlos/broken-links
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
# - name: Generate artifact attestation
# uses: actions/attest-build-provenance@v1
# with:
# subject-name: merlos/broken-links
# subject-digest: ${{ steps.push.outputs.digest }}
# push-to-registry: true

0 comments on commit eb11572

Please sign in to comment.