Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Multi arch docker manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
choffmeister committed Nov 27, 2021
1 parent d09cac0 commit 673d233
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.go]
indent_style = tab
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 4
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: https://ghcr.io
registry: ghcr.io
username: airfocusio
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
Expand All @@ -25,4 +27,3 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

29 changes: 26 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,33 @@ builds:
- linux
goarch:
- amd64
- arm64
dockers:
- image_templates:
- "ghcr.io/airfocusio/{{ .ProjectName }}:{{ .Tag }}"
- "ghcr.io/airfocusio/{{ .ProjectName }}:latest"
- "ghcr.io/airfocusio/{{ .ProjectName }}:{{ .Version }}-amd64"
- "ghcr.io/airfocusio/{{ .ProjectName }}:latest-amd64"
use: buildx
goarch: amd64
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/airfocusio/{{ .ProjectName }}:{{ .Version }}-arm64v8"
- "ghcr.io/airfocusio/{{ .ProjectName }}:latest-arm64v8"
use: buildx
goarch: arm64
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: ghcr.io/airfocusio/{{ .ProjectName }}:{{ .Version }}
image_templates:
- ghcr.io/airfocusio/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/airfocusio/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: ghcr.io/airfocusio/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/airfocusio/{{ .ProjectName }}:latest-amd64
- ghcr.io/airfocusio/{{ .ProjectName }}:latest-arm64v8
checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -23,4 +46,4 @@ changelog:
filters:
exclude:
- '^docs:'
- '^test:'
- '^test:'

0 comments on commit 673d233

Please sign in to comment.