From 6dc474f7591b05ea081716319f00ce44db202d11 Mon Sep 17 00:00:00 2001 From: Michael Seele Date: Fri, 22 May 2026 09:29:42 +0200 Subject: [PATCH] fix: force public npm registry for pnpm self-installer bootstrap pnpm/action-setup bootstraps itself via npm before pnpm is available. If a repo has a custom registry in .npmrc (e.g. pointing to JFrog or Nexus), the self-installer tries to fetch pnpm from that registry without credentials and fails with exit code 1. Setting NPM_CONFIG_REGISTRY overrides .npmrc for this step only, ensuring pnpm is always fetched from the public registry. Private registry auth is configured in subsequent steps once pnpm is ready. --- pnpm-build/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pnpm-build/action.yml b/pnpm-build/action.yml index 4d3397e..e5b3501 100644 --- a/pnpm-build/action.yml +++ b/pnpm-build/action.yml @@ -50,6 +50,12 @@ runs: # pnpm/action-setup v4.3.0 — https://code.forgejo.org/pnpm/action-setup/commits/tag/v4.3.0 - name: Install pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 + env: + # Override any registry configured in .npmrc (e.g. JFrog or Nexus). + # pnpm/action-setup bootstraps itself via npm before pnpm is available, + # so it must reach the public npm registry. Auth for private registries + # is configured in a later step, after pnpm is installed. + NPM_CONFIG_REGISTRY: https://registry.npmjs.org with: version: ${{ inputs.pnpm-version }} -- 2.49.1