Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] support multi arch #433

Merged
merged 2 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ jobs:
- name: Install gox
FZambia marked this conversation as resolved.
Show resolved Hide resolved
run: GO111MODULE=off go get github.com/mitchellh/gox

- name: "Set up QEMU"
uses: docker/setup-qemu-action@v1
with:
platforms: all
FZambia marked this conversation as resolved.
Show resolved Hide resolved

- name: "Set up Docker buildx"
uses: "docker/setup-buildx-action@v1"

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
Expand Down
51 changes: 44 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ builds:
- amd64
- "386"
- arm
- arm64
FZambia marked this conversation as resolved.
Show resolved Hide resolved
ignore:
- goos: darwin
goarch: "386"
Expand All @@ -40,6 +41,10 @@ builds:
goarch: arm
- goos: freebsd
goarch: arm
- goos: windows
goarch: arm64
- goos: freebsd
goarch: arm64
main: .
ldflags: -s -w -X main.VERSION={{.Version}}
binary: centrifugo
Expand Down Expand Up @@ -72,14 +77,46 @@ signs:
signature: ${artifact}.sig
artifacts: none
dockers:
-
ids:
- ids:
- centrifugo
goos: linux
goarch: amd64
goarm: ''
image_templates:
- "centrifugo/centrifugo:{{ .Tag }}"
- "centrifugo/centrifugo:v{{ .Major }}"
- "centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }}"
- "centrifugo/centrifugo:latest"
- "centrifugo/centrifugo:{{ .Tag }}-amd64"
- "centrifugo/centrifugo:v{{ .Major }}-amd64"
- "centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }}-amd64"
- "centrifugo/centrifugo:latest-amd64"
use_buildx: true
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- ids:
- centrifugo
goos: linux
goarch: arm64
image_templates:
- "centrifugo/centrifugo:{{ .Tag }}-arm64v8"
- "centrifugo/centrifugo:v{{ .Major }}-arm64v8"
- "centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }}-arm64v8"
- "centrifugo/centrifugo:latest-arm64v8"
use_buildx: true
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--pull"
docker_manifests:
- name_template: centrifugo/centrifugo:{{ .Tag }}
image_templates:
- centrifugo/centrifugo:{{ .Tag }}-arm64v8
- centrifugo/centrifugo:{{ .Tag }}-amd64
- name_template: centrifugo/centrifugo:v{{ .Major }}
image_templates:
- centrifugo/centrifugo:{{ .Tag }}-arm64v8
- centrifugo/centrifugo:{{ .Tag }}-amd64
- name_template: centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }}
image_templates:
- centrifugo/centrifugo:{{ .Tag }}-arm64v8
- centrifugo/centrifugo:{{ .Tag }}-amd64
- name_template: centrifugo/centrifugo:latest
image_templates:
- centrifugo/centrifugo:{{ .Tag }}-arm64v8
- centrifugo/centrifugo:{{ .Tag }}-amd64