ci: build arm64 and amd64 container images for ci images (#1036)

pull/1102/head
ᗪєνιη ᗷυнʟ 4 years ago committed by GitHub
parent 7aa0239cd9
commit 9966632c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,6 +59,7 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true push: true
build-args: | build-args: |
COMMIT_TAG=${{ github.sha }} COMMIT_TAG=${{ github.sha }}

@ -1,11 +1,20 @@
FROM node:14.16-alpine AS BUILD_IMAGE FROM node:14.16-alpine AS BUILD_IMAGE
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
ARG COMMIT_TAG ARG COMMIT_TAG
ENV COMMIT_TAG=${COMMIT_TAG} ENV COMMIT_TAG=${COMMIT_TAG}
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app
RUN \
case "${TARGETPLATFORM}" in \
'linux/arm64') apk add --no-cache python make g++ ;; \
'linux/arm/v7') apk add --no-cache python make g++ ;; \
esac
RUN yarn --frozen-lockfile && \ RUN yarn --frozen-lockfile && \
yarn build yarn build

Loading…
Cancel
Save