diff --git a/.github/workflows/docker-bot.yml b/.github/workflows/docker-bot.yml index 768cda8..d2ae3fa 100644 --- a/.github/workflows/docker-bot.yml +++ b/.github/workflows/docker-bot.yml @@ -15,6 +15,8 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 @@ -36,6 +38,7 @@ jobs: with: context: . file: headless/docker/Dockerfile + platforms: linux/amd64,linux/arm64,linux/386 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/headless/docker/Dockerfile b/headless/docker/Dockerfile index b199e3c..a662da3 100644 --- a/headless/docker/Dockerfile +++ b/headless/docker/Dockerfile @@ -1,5 +1,7 @@ -FROM golang:1.26-bookworm AS build -ENV CGO_ENABLED=0 +FROM --platform=$BUILDPLATFORM golang:1.26-bookworm AS build +ARG TARGETOS +ARG TARGETARCH +ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH WORKDIR /src COPY relay /src/relay