From 572c658cf22c510b065c556299e7f95d1f4b7145 Mon Sep 17 00:00:00 2001 From: Alexander Madyankin Date: Wed, 1 Jul 2026 09:24:03 +0200 Subject: [PATCH] Make Docker wrapper opt-in via USE_DOCKER Windows CI runners can't pull the Linux `node:22` image, so every Docker-wrapped Makefile target fails with "no matching manifest for windows/amd64". Gate the wrapper behind `USE_DOCKER` (default `1`) so local invocations keep the Docker behavior, and set `USE_DOCKER=0` in the workflow env to run the recipes directly against the runner's host `node`/`npm`. --- .github/workflows/test.js.yml | 1 + Makefile | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.js.yml b/.github/workflows/test.js.yml index 28c015c..f99a8c1 100644 --- a/.github/workflows/test.js.yml +++ b/.github/workflows/test.js.yml @@ -2,6 +2,7 @@ name: Test env: FORCE_COLOR: "1" + USE_DOCKER: "0" on: push: diff --git a/Makefile b/Makefile index 1e3f5c0..2a4443e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,13 @@ BUILD_DIR = ./build NODE_IMAGE = node:22 -DOCKER = docker run --rm -v "$(CURDIR)":/app -w /app $(NODE_IMAGE) +USE_DOCKER ?= 1 + +ifeq ($(USE_DOCKER),1) +DOCKER = docker run --rm -t -e FORCE_COLOR=1 -v "$(CURDIR)":/app -w /app $(NODE_IMAGE) +else +DOCKER = +endif + EXEC = $(DOCKER) npm exec -- .PHONY: clean lint compile test build publish pack release-patch release-minor release-major