From c7ee790f9ca8dfcde2bf6d7f358849b46728e4be Mon Sep 17 00:00:00 2001 From: youegraillot Date: Wed, 13 Sep 2023 20:37:09 +0200 Subject: [PATCH] fix multiplatform build --- .github/workflows/docker-ci.yml | 2 ++ Dockerfile | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 3d6473c..27db140 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -3,6 +3,8 @@ name: Docker CI on: workflow_dispatch: push: + branches: + - "**" tags-ignore: - "v*" diff --git a/Dockerfile b/Dockerfile index adffe62..496a941 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM docker.io/library/node:16-alpine as deemix +FROM --platform=$TARGETPLATFORM docker.io/library/node:16-alpine as deemix -ARG TARGETPLATFORM=linux/amd64 +ARG TARGETPLATFORM +ARG BUILDPLATFORM -RUN echo "Building for TARGETPLATFORM=$TARGETPLATFORM" +RUN echo "Building for TARGETPLATFORM=$TARGETPLATFORM | BUILDPLATFORM=$BUILDPLATFORM" RUN apk add --no-cache git jq python3 make gcc musl-dev g++ && \ rm -rf /var/lib/apt/lists/* RUN git clone --recurse-submodules https://gitlab.com/RemixDev/deemix-gui.git @@ -13,7 +14,7 @@ RUN case "$TARGETPLATFORM" in \ "linux/arm64") \ jq '.pkg.targets = ["node16-alpine-arm64"]' ./server/package.json > tmp-json ;; \ *) \ - echo "Platform not supported" && exit 1 ;; \ + echo "Platform $TARGETPLATFORM not supported" && exit 1 ;; \ esac && \ mv tmp-json /deemix-gui/server/package.json RUN yarn install-all