Skip to content

Commit 615ad59

Browse files
macabuAdmiral-Piett
authored andcommitted
chore(release): build multi-arch docker image with same suffix
While trying to migrate workloads from amd64 to arm64, having a single tag for both architectures makes the transition easier. Reference: https://goreleaser.com/cookbooks/multi-platform-docker-images/#creating-multi-platform-docker-images-with-goreleaser
1 parent d4e4598 commit 615ad59

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.goreleaser.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,34 @@ dockers:
4444
- goos: linux
4545
goarch: amd64
4646
dockerfile: goreleaser.dockerfile
47+
use: buildx
4748
image_templates:
48-
- "admiralpiett/goaws"
49-
- "admiralpiett/goaws:{{ .Tag }}"
5049
- "admiralpiett/goaws:{{ .Tag }}-amd64"
51-
- "admiralpiett/goaws:latest-amd64"
52-
- "admiralpiett/goaws:latest"
5350
extra_files:
5451
- app/conf/goaws.yaml
5552
build_flag_templates:
5653
- "--platform=linux/amd64"
5754
- goos: linux
5855
goarch: arm64
5956
dockerfile: goreleaser.dockerfile
57+
use: buildx
6058
image_templates:
6159
- "admiralpiett/goaws:{{ .Tag }}-arm64"
62-
- "admiralpiett/goaws:latest-arm64"
6360
extra_files:
6461
- app/conf/goaws.yaml
6562
build_flag_templates:
6663
- "--platform=linux/arm64"
6764

65+
docker_manifests:
66+
- name_template: admiralpiett/goaws:{{ .Tag }}
67+
image_templates:
68+
- admiralpiett/goaws:{{ .Tag }}-amd64
69+
- admiralpiett/goaws:{{ .Tag }}-arm64
70+
- name_template: admiralpiett/goaws:latest
71+
image_templates:
72+
- admiralpiett/goaws:{{ .Tag }}-amd64
73+
- admiralpiett/goaws:{{ .Tag }}-arm64
74+
6875
archives:
6976
- id: archive_names
7077
name_template: >-

0 commit comments

Comments
 (0)