mirror of
https://github.com/mermaid-js/mermaid-live-editor.git
synced 2026-11-04 08:59:08 +00:00
ci: Build the Docker image's static site natively instead of under QEMU
The multi-platform Docker build ran pnpm install and pnpm build for
linux/arm64 under QEMU emulation. QEMU intermittently crashes there
("qemu: uncaught target signal 4 (Illegal instruction)") or stalls, and
buildkit then waits until GitHub cancels the job at 6 hours: 16
cancelled runs in September, including a develop push.
The build output is a static site, identical on every architecture, so
the node stages now run on $BUILDPLATFORM and only the nginx stage
(COPY only) is built per architecture. Also caps the job at 30 minutes
so any future hang fails fast.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
55958daa4a
commit
5eedbbecfa
2 files changed
+6
-1
No files matched your search
@@ -17,6 +17,8 @@ on:
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
# A healthy build takes a few minutes; fail fast instead of hanging for 6 hours.
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
+4
-1
@@ -1,4 +1,7 @@
|
||||
FROM docker.io/library/node:24.16.0-alpine3.22 AS mermaid-live-editor-dependencies
|
||||
# The build output is a static site, so build it once on the runner's native
|
||||
# platform instead of under QEMU emulation; only the nginx stage below is
|
||||
# per-architecture.
|
||||
FROM --platform=$BUILDPLATFORM docker.io/library/node:24.16.0-alpine3.22 AS mermaid-live-editor-dependencies
|
||||
|
||||
RUN apk --no-cache add build-base git python3 && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
Reference in new issue
Block a user