mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-07 09:24:09 +00:00
fix(ci): add linux/arm64 Docker build support with QEMU optimization (#76)
- Add docker/setup-qemu-action@v3 to docker-publish.yml (was missing, causing multi-platform builds to hang indefinitely) - Add platforms: linux/amd64,linux/arm64 to build-push-action step - Optimize Dockerfile with --platform=$BUILDPLATFORM on builder stages so TypeScript compilation runs at native amd64 speed; only the lean npm ci --omit=dev step runs under QEMU in the final stage, compiling the three native modules (bcrypt, better-sqlite3, node-pty) for the correct target architecture — reduces arm64 build time from 6+ hours to ~15-30 minutes
This commit is contained in:
@@ -16,8 +16,10 @@ jobs:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU (for ARM64 support)
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@@ -44,8 +46,8 @@ jobs:
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=saelix/sencho:buildcache
|
||||
|
||||
Reference in New Issue
Block a user