1
0
mirror of https://github.com/containrrr/watchtower.git synced 2024-12-12 09:04:17 +02:00

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

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
This commit is contained in:
nils måsén 2021-02-04 11:30:56 +01:00 committed by GitHub
parent a068203e4d
commit d0943c3b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 23 deletions

View File

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

View File

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

View File

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

View File

@ -9,23 +9,26 @@ build:
- 386
- arm
- arm64
archive:
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
format: tar.gz
replacements:
arm: armhf
arm64: arm64v8
amd64: amd64
386: 386
darwin: macOS
linux: linux
format_overrides:
- goos: windows
format: zip
files:
- LICENSE.md
archives:
-
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
format: tar.gz
replacements:
arm: armhf
arm64: arm64v8
amd64: amd64
386: 386
darwin: macOS
linux: linux
format_overrides:
- goos: windows
format: zip
files:
- LICENSE.md
dockers:
-
use_buildx: true
build_flag_templates: [ "--platform=linux/amd64" ]
goos: linux
goarch: amd64
goarm: ''
@ -35,7 +38,9 @@ dockers:
- containrrr/watchtower:amd64-latest
binaries:
- watchtower
-
-
use_buildx: true
build_flag_templates: [ "--platform=linux/386" ]
goos: linux
goarch: 386
goarm: ''
@ -45,7 +50,9 @@ dockers:
- containrrr/watchtower:i386-latest
binaries:
- watchtower
-
-
use_buildx: true
build_flag_templates: [ "--platform=linux/arm/v6" ]
goos: linux
goarch: arm
goarm: 6
@ -55,7 +62,9 @@ dockers:
- containrrr/watchtower:armhf-latest
binaries:
- watchtower
-
-
use_buildx: true
build_flag_templates: [ "--platform=linux/arm64/v8" ]
goos: linux
goarch: arm64
goarm: ''