From d28fa50f8b1ae82e27764c384d971cd5dd185459 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 2 Mar 2026 20:11:04 -0800 Subject: [PATCH] CI: make node deps install optional in setup action --- .github/actions/setup-node-env/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-node-env/action.yml b/.github/actions/setup-node-env/action.yml index 9b86881fdb2..1b70385ca54 100644 --- a/.github/actions/setup-node-env/action.yml +++ b/.github/actions/setup-node-env/action.yml @@ -1,7 +1,7 @@ name: Setup Node environment description: > Initialize submodules with retry, install Node 22, pnpm, optionally Bun, - and run pnpm install. Requires actions/checkout to run first. + and optionally run pnpm install. Requires actions/checkout to run first. inputs: node-version: description: Node.js version to install. @@ -19,6 +19,10 @@ inputs: description: Use Blacksmith sticky disks for pnpm store caching. required: false default: "false" + install-deps: + description: Whether to run pnpm install after environment setup. + required: false + default: "true" frozen-lockfile: description: Whether to use --frozen-lockfile for install. required: false @@ -44,7 +48,7 @@ runs: uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: ${{ inputs.node-version }} - check-latest: true + check-latest: false - name: Setup pnpm + cache store uses: ./.github/actions/setup-pnpm-store-cache @@ -68,10 +72,12 @@ runs: if command -v bun &>/dev/null; then bun -v; fi - name: Capture node path + if: inputs.install-deps == 'true' shell: bash run: echo "NODE_BIN=$(dirname "$(node -p "process.execPath")")" >> "$GITHUB_ENV" - name: Install dependencies + if: inputs.install-deps == 'true' shell: bash env: CI: "true"