Skip to content

Commit

Permalink
fix golreleaser for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Sandel authored and Florian Sandel committed Feb 11, 2025
1 parent e97ba29 commit a43a06b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@ jobs:
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Git Fetch
run: git fetch --force --tags

- name: Setup go
uses: actions/setup-go@v4
with:
go-version: stable
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1

- name: Cache Go Modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
Expand Down
9 changes: 6 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: 2
project_name: external-dns-stackit-webhook
snapshot:
version_template: '{{ .Tag }}-SNAPSHOT'

builds:
- id: external-dns-stackit-webhook
goos:
Expand Down Expand Up @@ -53,6 +54,7 @@ dockers:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
- --platform=linux/amd64
skip_push: false

- id: external-dns-stackit-webhook-arm64
Expand All @@ -71,18 +73,19 @@ dockers:
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
- --label=org.opencontainers.image.platform.os=linux
- --platform=linux
- --platform=linux/arm64
skip_push: false

# https://goreleaser.com/cookbooks/multi-platform-docker-images
docker_manifests:
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"

checksum:
disable: false
Expand Down

0 comments on commit a43a06b

Please sign in to comment.