chore(ci): set image platform on image build (#811)

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
pull/817/head
nils måsén 4 years ago committed by GitHub
parent a068203e4d
commit d0943c3b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -69,5 +69,5 @@ jobs:
- name: Build - name: Build
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v2
with: with:
version: v0.104.1 version: v0.155.0
args: --snapshot --skip-publish --debug args: --snapshot --skip-publish --debug

@ -70,10 +70,10 @@ jobs:
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.15.x go-version: 1.15.x
- name: Run goreleaser - name: Build
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v2
with: with:
version: v0.104.1 version: v0.155.0
args: --debug args: --debug
- name: Enable experimental docker features - name: Enable experimental docker features
run: | run: |

@ -1,4 +1,4 @@
FROM alpine:3.11 as alpine FROM --platform=$BUILDPLATFORM alpine:3.11 as alpine
RUN apk add --no-cache \ RUN apk add --no-cache \
ca-certificates \ ca-certificates \

@ -9,23 +9,26 @@ build:
- 386 - 386
- arm - arm
- arm64 - arm64
archive: archives:
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}" -
format: tar.gz name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
replacements: format: tar.gz
arm: armhf replacements:
arm64: arm64v8 arm: armhf
amd64: amd64 arm64: arm64v8
386: 386 amd64: amd64
darwin: macOS 386: 386
linux: linux darwin: macOS
format_overrides: linux: linux
- goos: windows format_overrides:
format: zip - goos: windows
files: format: zip
- LICENSE.md files:
- LICENSE.md
dockers: dockers:
- -
use_buildx: true
build_flag_templates: [ "--platform=linux/amd64" ]
goos: linux goos: linux
goarch: amd64 goarch: amd64
goarm: '' goarm: ''
@ -36,6 +39,8 @@ dockers:
binaries: binaries:
- watchtower - watchtower
- -
use_buildx: true
build_flag_templates: [ "--platform=linux/386" ]
goos: linux goos: linux
goarch: 386 goarch: 386
goarm: '' goarm: ''
@ -46,6 +51,8 @@ dockers:
binaries: binaries:
- watchtower - watchtower
- -
use_buildx: true
build_flag_templates: [ "--platform=linux/arm/v6" ]
goos: linux goos: linux
goarch: arm goarch: arm
goarm: 6 goarm: 6
@ -56,6 +63,8 @@ dockers:
binaries: binaries:
- watchtower - watchtower
- -
use_buildx: true
build_flag_templates: [ "--platform=linux/arm64/v8" ]
goos: linux goos: linux
goarch: arm64 goarch: arm64
goarm: '' goarm: ''

Loading…
Cancel
Save