You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why does node version not follow the actions/setup-node? #241
Unless actions/setup-node is explicitly used, for our hosted runners, the version of Node.js will be whatever is installed in the virtual environment you're using (for example ubuntu-latest). This is documented in "Software installed on GitHub-hosted runners". For example, the current ubuntu-latest, which is 18.04, uses Node.js 12.18.3.
I think this is the best way.
Or is there any security considering that I don't know?
I don't think that comment is correct - due to how this action is wrapping the passed in script, the version of node used will match the version used by the action
Activity
joshmgross commentedon Feb 11, 2022
👋 Hey @hellodword,
I don't think that comment is correct - due to how this action is wrapping the passed in script, the version of node used will match the version used by the action
https://github.com/actions/github-script/blob/main/src/async-function.ts
github-script/action.yml
Line 30 in 9ac0880
The Actions runner bundles its own version of Node to run JavaScript actions - so the version of Node installed by
setup-nodewill never be used.hellodword commentedon Feb 12, 2022
Thanks @joshmgross,
so it's kind of a limit of github actions, right?
Seems it only has
node12andnode16, and we can't use dynamic node version as runtime.joshmgross commentedon Feb 14, 2022
That's correct