actions / actions/setup-node

Node distributions not pulled from authenticated mirrors

Open
#1,412 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
5k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
2

Description

Description:
When you use an authenticated mirror, the node distribution is always pulled from github, not from the mirror. This is due to the manifest check always being run, and the mirror fallback runs only if the manifest fails or the version isn't found.

Action version:
v5 (but 6 appears to have the same problem)

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
N/A

Repro steps:
Run with any authenticated mirror (in my case, jfrog artifactory). Set mirror and mirror-token, with node-version: 22.20.0 for example.

Expected behavior:
setup-node pulls the node distribution from my mirror https://redacted/artifactory/nodejs-remote/dist/v22.20.0/node-v22.20.0-linux-x64.tar.gz.

Actual behavior:
setup-node always pulls the node distribution from https://github.com/actions/node-versions/releases/download/22.20.0-17993202319/node-22.20.0-linux-x64.tar.gz.

I can provide a PR to solve this, if desired.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the setup-node handling for the mirror, mirror-token, and node-version inputs, focusing on the manifest check and mirror fallback described in the report. Reproduce with an authenticated Artifactory mirror and Node 22.20.0; done means the distribution is fetched from the mirror URL instead of GitHub.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.