Skip to content

Commit

Permalink
Merge pull request #37 from matzegebbe/feat/goReleaserMultiArch
Browse files Browse the repository at this point in the history
ci: gorleaser multiarch docker build
  • Loading branch information
matzegebbe authored Jun 16, 2024
2 parents b31953d + 7377cac commit 627eea6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
- name: Checkout code
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: Docker Login
uses: docker/[email protected]
with:
Expand Down
24 changes: 23 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ release:

dockers:
- id: linux-amd64
use: buildx
goos: linux
goarch: amd64
dockerfile: Dockerfile-goreleaser
Expand All @@ -47,5 +48,26 @@ dockers:
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- "--platform=linux/amd64"
image_templates:
- "ghcr.io/matzegebbe/web-jwks-validator:v{{ .Version }}"
- "ghcr.io/matzegebbe/web-jwks-validator:v{{ .Version }}-amd64"
- id: linux-arm64
use: buildx
goos: linux
goarch: arm64
dockerfile: Dockerfile-goreleaser
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.source={{ .GitURL }}"
- "--platform=linux/arm64"
image_templates:
- "ghcr.io/matzegebbe/web-jwks-validator:v{{ .Version }}-arm64"

docker_manifests:
- name_template: "ghcr.io/matzegebbe/web-jwks-validator:v{{ .Version }}"
image_templates:
- "ghcr.io/matzegebbe/web-jwks-validator:v{{ .Version }}-amd64"
- "ghcr.io/matzegebbe/web-jwks-validator:v{{ .Version }}-arm64"

0 comments on commit 627eea6

Please sign in to comment.