Skip to content

Commit e26b945

Browse files
committed
feat: add multiarch support
Modify .goreleaser.yml file to build two images one for amd64 and another for arm64 and then create the proper manifest to publish with the proper images. Closes get-woke#215 Signed-off-by: Jonathan Gonzalez V <[email protected]>
1 parent 4cc10d8 commit e26b945

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

Diff for: .goreleaser.yml

+32-3
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,39 @@ changelog:
5050

5151
dockers:
5252
- dockerfile: build/Dockerfile
53+
use: buildx
54+
goos: linux
55+
goarch: amd64
56+
build_flag_templates:
57+
- "--platform=linux/amd64"
5358
image_templates:
54-
- "getwoke/woke:latest"
55-
- "getwoke/woke:{{ .Major }}.{{ .Minor }}"
56-
- "getwoke/woke:{{ .RawVersion }}"
59+
- "getwoke/woke:latest-amd64"
60+
- "getwoke/woke:{{ .Major }}.{{ .Minor }}-amd64"
61+
- "getwoke/woke:{{ .RawVersion }}-amd64"
62+
- dockerfile: build/Dockerfile
63+
use: buildx
64+
goos: linux
65+
goarch: arm64
66+
build_flag_templates:
67+
- "--platform=linux/arm64"
68+
image_templates:
69+
- "getwoke/woke:latest-arm64"
70+
- "getwoke/woke:{{ .Major }}.{{ .Minor }}-arm64"
71+
- "getwoke/woke:{{ .RawVersion }}-arm64"
72+
73+
docker_manifests:
74+
- name_template: getwoke/woke:latest
75+
image_templates:
76+
- "getwoke/woke:latest-amd64"
77+
- "getwoke/woke:latest-arm64"
78+
- name_template: getwoke/woke:{{ .Major }}.{{ .Minor }}
79+
image_templates:
80+
- "getwoke/woke:{{ .Major }}.{{ .Minor }}-amd64"
81+
- "getwoke/woke:{{ .Major }}.{{ .Minor }}-arm64"
82+
- name_template: getwoke/woke:{{ .RawVersion }}
83+
image_templates:
84+
- "getwoke/woke:{{ .RawVersion }}-amd64"
85+
- "getwoke/woke:{{ .RawVersion }}-arm64"
5786

5887
brews:
5988
- tap:

0 commit comments

Comments
 (0)