-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What version of node is used in Actions to run gh-scripts? #76
Comments
Hi @ahmadnassri, good question! Unless If you're using self-hosted runners, the installed version of Node.js may differ. |
interesting... setup-node with 14 didn't seem to have the desired effect in my testing. (was using Null Coalescing Operator in my script) but ... I've moved to a separate full action now so I can't revisit easily ... regardless, this would be useful to document in the readme. thanks |
@ahmadnassri Can you point me to the workflow file, if it's public? |
it isn't public unfortunately |
I'll keep this issue in my tabs and might come back to it later and make another test on a public repo to share |
AFAIK, the runner runs JS action with Node.js 12 regardless of Line 30 in fc4d627
|
The current I set up a job with the following statements: runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
node-version: 14
- run: |
console.debug({nodeVersion: process.version});
shell: node --input-type=module {0}
- uses: actions/[email protected]
with:
script: |
console.debug({nodeVersion: process.version}); And got the following as results from the console logs:
So I'd say that this action is overriding the version supplied by both the environment AND Please revisit this. |
Looks like node14 isn't yet available to JavaScript actions: actions/runner#772 Though it looks like there's been some recent motion on that front. To workaround that would require being able to execute the provided script using the system node outside of the current node process. |
runners already support node v16, but this action uses node@12 anyway. is there a way to force it to use v16? |
👋 @luisrudge with #235 and |
@joshmgross great! is v6 already available? |
Yep! https://github.com/actions/github-script/releases |
The documentation does not detail what version of node is used to execute, and whether
actions/setup-node
would of any use / relevance?The text was updated successfully, but these errors were encountered: