Skip to content

Commit 789ad07

Browse files
authored
Merge pull request #22 from stackitcloud/bugfix/broken-releaser
fix: fix golreleaser for arm64
2 parents e97ba29 + a43a06b commit 789ad07

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/release.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@ jobs:
1919
IMAGE_NAME: ${{ github.repository }}
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
22+
uses: actions/checkout@v3
2323
with:
2424
fetch-depth: 0
25+
2526
- name: Git Fetch
2627
run: git fetch --force --tags
28+
2729
- name: Setup go
2830
uses: actions/setup-go@v4
2931
with:
3032
go-version: stable
31-
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
33+
34+
- name: Cache Go Modules
35+
uses: actions/cache@v4
3236
with:
3337
path: |
3438
~/.cache/go-build

.goreleaser.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: 2
33
project_name: external-dns-stackit-webhook
44
snapshot:
55
version_template: '{{ .Tag }}-SNAPSHOT'
6+
67
builds:
78
- id: external-dns-stackit-webhook
89
goos:
@@ -53,6 +54,7 @@ dockers:
5354
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
5455
- --label=org.opencontainers.image.revision={{ .FullCommit }}
5556
- --label=org.opencontainers.image.licenses=Apache-2.0
57+
- --platform=linux/amd64
5658
skip_push: false
5759

5860
- id: external-dns-stackit-webhook-arm64
@@ -71,18 +73,19 @@ dockers:
7173
- --label=org.opencontainers.image.revision={{ .FullCommit }}
7274
- --label=org.opencontainers.image.licenses=Apache-2.0
7375
- --label=org.opencontainers.image.platform.os=linux
74-
- --platform=linux
76+
- --platform=linux/arm64
7577
skip_push: false
7678

79+
# https://goreleaser.com/cookbooks/multi-platform-docker-images
7780
docker_manifests:
7881
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
7982
image_templates:
8083
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
8184
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
8285
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
8386
image_templates:
84-
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
85-
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
87+
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
88+
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
8689

8790
checksum:
8891
disable: false

0 commit comments

Comments
 (0)