limit archs

This commit is contained in:
pat-s 2024-04-29 00:10:34 +02:00
parent 99212edb20
commit 3cd40defd6
No known key found for this signature in database
GPG key ID: 3C6318841EF78925
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ steps:
image: woodpeckerci/plugin-docker-buildx:3.2.1 image: woodpeckerci/plugin-docker-buildx:3.2.1
settings: settings:
dockerfile: Dockerfile dockerfile: Dockerfile
platforms: linux/amd64,arm64 platforms: linux/amd64,linux/arm64
dry-run: true dry-run: true
tags: latest tags: latest
when: when:

View file

@ -15,7 +15,7 @@ ARG TARGETOS TARGETARCH
RUN --mount=type=cache,target=/root/.cache/go-build \ RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \ --mount=type=cache,target=/go/pkg \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=1 \ GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=1 \
xgo -x -v -tags='sqlite sqlite_unlock_notify netgo' -ldflags='-s -w -extldflags "-static" -linkmode external' -out pages . xgo -x -v --targets=linux/arm64,linux/amd64 -tags='sqlite sqlite_unlock_notify netgo' -ldflags='-s -w -extldflags "-static" -linkmode external' -out pages .
# Use a scratch image as the base image for the final container, # Use a scratch image as the base image for the final container,
# which will contain only the built binary and the CA certificates # which will contain only the built binary and the CA certificates