Skip to content

Commit

Permalink
Merge pull request #518 from arbourd/add-multiarch-builds
Browse files Browse the repository at this point in the history
Add multiarch container builds
  • Loading branch information
LandonTClipp authored Nov 15, 2022
2 parents a55c02d + e9abbc5 commit 1951b28
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
release:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -18,6 +21,12 @@ jobs:
with:
go-version: 1.19

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand Down
39 changes: 33 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,47 @@ snapshot:
changelog:
sort: asc
dockers:
- goos: linux
- image_templates: ["vektra/mockery:{{ .Tag }}-amd64"]
goarch: amd64
image_templates:
- 'vektra/mockery:{{ .Tag }}'
- 'vektra/mockery:v{{ .Major }}'
- 'vektra/mockery:v{{ .Major }}.{{ .Minor }}'
- 'vektra/mockery:latest'
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- image_templates: ["vektra/mockery:{{ .Tag }}-arm64"]
goarch: arm64
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
docker_manifests:
- name_template: vektra/mockery:{{ .Tag }}
image_templates:
- vektra/mockery:{{ .Tag }}-amd64
- vektra/mockery:{{ .Tag }}-arm64
- name_template: vektra/mockery:v{{ .Major }}
image_templates:
- vektra/mockery:{{ .Tag }}-amd64
- vektra/mockery:{{ .Tag }}-arm64
- name_template: vektra/mockery:v{{ .Major }}.{{ .Minor }}
image_templates:
- vektra/mockery:{{ .Tag }}-amd64
- vektra/mockery:{{ .Tag }}-arm64
- name_template: vektra/mockery:latest
image_templates:
- vektra/mockery:{{ .Tag }}-amd64
- vektra/mockery:{{ .Tag }}-arm64
brews:
- homepage: https://github.com/vektra/mockery
description: "A mock code autogenerator for Go"
Expand Down

0 comments on commit 1951b28

Please sign in to comment.