setup-node icon indicating copy to clipboard operation
setup-node copied to clipboard

Support node.js mirror like nvm

Open thomas-z-meyer-db opened this issue 2 years ago • 6 comments

Description: Support alternate nodejs download mirror like nvm

nvm does support setting a mirror via environment variable, e.g: NVM_NODEJS_ORG_MIRROR=https://artifactory.company.com/artifactory/node-dist/

setup-node should also support a similar option "mirror" to specify an alternate node.js base URL for downloading the node.js binaries.

Justification: All node.js binaries are downloaded directly from the internet via a specified proxy in the github action runners environment, which created egress costs for self-hosted github action runners in GHEC.

By using mirror option the reliance on node.js site is decoupled and egress is saved.

Are you willing to submit a PR? i think i'm not allowed...

thomas-z-meyer-db avatar Mar 28 '23 13:03 thomas-z-meyer-db

Hello @thomas-z-meyer-db ! Thank you for the suggested idea! We will consider adding this feature and will let you know as soon as we have any decision.

MaksimZhukov avatar Mar 29 '23 11:03 MaksimZhukov

nodejs.org seems to fail quite often in the recent weeks. Having a possibility to specify a mirror would be great.

Santas avatar Apr 12 '23 09:04 Santas

Hi! I'm also affected by nodejs.org fails. Is setup-node action caching the node tarball, so it's not downloaded every time? https://github.com/actions/toolkit/tree/main/packages/tool-cache

bgalek avatar Jun 20 '23 20:06 bgalek

NodeJs has been timing out a lot in recent days for us, so this feature would make our life much easier

dariusz22p avatar Jul 05 '23 14:07 dariusz22p

Is this feature open for OSS contributions?

yeikel avatar Sep 18 '23 23:09 yeikel

https://github.com/actions/setup-node/pull/134 can resolve this problom, can we merge it ?

zhyc9de avatar Sep 25 '24 08:09 zhyc9de