Make Docker pnpm install resilient to sharp ignored-builds; drop
Docker / build (push) Successful in 1m26s

unreachable gha cache
This commit is contained in:
2026-07-17 01:31:30 +12:00
parent 8857163e11
commit 1da82b9d30
3 changed files with 28 additions and 3 deletions
+6 -1
View File
@@ -24,7 +24,12 @@ RUN --mount=type=cache,target=/root/.npm \
elif [ -f yarn.lock ]; then \
corepack enable yarn && yarn install --frozen-lockfile --production=false; \
elif [ -f pnpm-lock.yaml ]; then \
corepack enable pnpm && pnpm install --frozen-lockfile; \
# --config.strictDepBuilds=false: pnpm 11 hard-fails (ERR_PNPM_IGNORED_BUILDS)
# when a dependency with a build script (e.g. sharp) isn't explicitly approved.
# sharp ships prebuilt binaries so its build script is unnecessary; this flag
# downgrades the gate to a warning and keeps the build resilient regardless of
# pnpm-workspace.yaml's allowBuilds value. See CLAUDE.md "pnpm / sharp build".
corepack enable pnpm && pnpm install --frozen-lockfile --config.strictDepBuilds=false; \
else \
echo "No lockfile found." && exit 1; \
fi