Publish arm image too (#21)
base image (https://hub.docker.com/_/docker/tags?page=1&name=20.10-dind) do support amd64 and arm64 so we can do too Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/21
This commit is contained in:
parent
ddf80c66d6
commit
4add961b4c
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
/release/
|
/release/
|
||||||
/drone-docker-buildx*
|
|
||||||
|
docker-buildx
|
||||||
|
|
||||||
coverage.out
|
coverage.out
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
|
@ -1,20 +1,26 @@
|
|||||||
|
branches: main
|
||||||
|
|
||||||
|
variables:
|
||||||
|
- &platforms 'linux/amd64,linux/arm64'
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
dryrun:
|
dryrun:
|
||||||
image: plugins/kaniko
|
image: woodpeckerci/plugin-docker-buildx:v20.10.18
|
||||||
settings:
|
settings:
|
||||||
|
platforms: *platforms
|
||||||
repo: woodpeckerci/plugin-docker-buildx
|
repo: woodpeckerci/plugin-docker-buildx
|
||||||
tags: latest
|
dockerfile: Dockerfile.multiarch
|
||||||
dockerfile: Dockerfile
|
dry_run: true
|
||||||
no_push: true
|
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: plugins/kaniko
|
image: woodpeckerci/plugin-docker-buildx:v20.10.18
|
||||||
settings:
|
settings:
|
||||||
|
platforms: *platforms
|
||||||
repo: woodpeckerci/plugin-docker-buildx
|
repo: woodpeckerci/plugin-docker-buildx
|
||||||
tags: latest, ${CI_COMMIT_TAG}
|
tags: latest, ${CI_COMMIT_TAG}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile.multiarch
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
FROM golang:1.18-alpine as build
|
FROM --platform=$BUILDPLATFORM golang:1.18 as build
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 go build -v -a -tags netgo -o docker-buildx ./cmd/docker-buildx
|
ARG TARGETOS TARGETARCH
|
||||||
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
--mount=type=cache,target=/go/pkg \
|
||||||
|
make build
|
||||||
|
|
||||||
FROM docker:20.10-dind
|
FROM docker:20.10-dind
|
||||||
|
|
Loading…
Reference in New Issue
Block a user