diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 27be0670..8713f5f3 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 18669254..81d1ceb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/*