From 4379297176c1bfda124d7923736dbd184309255f Mon Sep 17 00:00:00 2001 From: Ali Mosajjal Date: Mon, 3 Feb 2025 22:47:27 +1300 Subject: [PATCH] added multi-platform builds --- .github/workflows/ghcr-main-dev.yml | 5 +++-- .github/workflows/ghcr.yml | 1 + Dockerfile | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ghcr-main-dev.yml b/.github/workflows/ghcr-main-dev.yml index 9cf7e158..c3dffee5 100644 --- a/.github/workflows/ghcr-main-dev.yml +++ b/.github/workflows/ghcr-main-dev.yml @@ -1,7 +1,7 @@ name: Publish dnsmonster to "dev" tag on each push on: push: - branches: [ main ] + branches: [main] env: REGISTRY: "ghcr.io" @@ -36,5 +36,6 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ github.actor }}/dnsmonster:dev + tags: ${{ env.REGISTRY }}/${{ github.actor }}/dnsmonster:dev labels: ${{ env.REGISTRY }}/${{ github.actor }}/dnsmonster:dev + platforms: linux/amd64,linux/arm/v6,linux/arm64 diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index f540ee53..385012c7 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -39,3 +39,4 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm/v6,linux/arm64 diff --git a/Dockerfile b/Dockerfile index 3172bf9a..e8d563d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM alpine:edge -LABEL maintainer "Ali Mosajjal " +FROM --platform=${BUILDPLATFORM:-linux/amd64} alpine:edge +LABEL maintainer="Ali Mosajjal " ENV REPO="github.com/mosajjal/dnsmonster"