Merge pull request #1414 from KagurazakaNyaa/master

ci: add linux/arm64 platform support for docker
This commit is contained in:
YuMao 2024-10-30 14:19:12 +08:00 committed by GitHub
commit 4d9959f666
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 2 deletions

View File

@ -19,6 +19,9 @@ jobs:
name=ghcr.io/${{ github.repository }}-web
name=githubyumao/mcsmanager-web,enable=${{ github.repository == 'MCSManager/MCSManager' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -41,8 +44,11 @@ jobs:
with:
file: dockerfile/web.dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta_web.outputs.tags }}
labels: ${{ steps.meta_web.outputs.labels }}
build-args: |
BUILDPLATFORM=linux/amd64
build-daemon:
runs-on: ubuntu-latest
@ -63,6 +69,9 @@ jobs:
name=ghcr.io/${{ github.repository }}-daemon-jdk${{ matrix.java_version }}
name=githubyumao/mcsmanager-daemon-jdk${{ matrix.java_version }},enable=${{ github.repository == 'MCSManager/MCSManager' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -85,7 +94,9 @@ jobs:
with:
file: dockerfile/daemon.dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta_daemon.outputs.tags }}
labels: ${{ steps.meta_daemon.outputs.labels }}
build-args: |
BUILDPLATFORM=linux/amd64
JAVA_RUNTIME=${{ matrix.java_version }}

View File

@ -1,6 +1,7 @@
ARG EMBEDDED_JAVA_VERSION=21
ARG BUILDPLATFORM=linux/amd64
FROM node:lts AS builder
FROM --platform=${BUILDPLATFORM} node:lts AS builder
WORKDIR /src
COPY . /src

View File

@ -1,4 +1,5 @@
FROM node:lts AS builder
ARG BUILDPLATFORM=linux/amd64
FROM --platform=${BUILDPLATFORM} node:lts AS builder
WORKDIR /src
COPY . /src