-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
How to target setup NODE version using environmental variables without hitting runner itself? #356
Comments
@jkabat Any follow up on this issue? I'm also trying to setup Node 17. |
Hello everyone. You've got an issue, because initially default node.js version is 12 for actions, that is why it does not accept such flag. If you need this options global for all steps, you can add global environment variable after installation of node.js. You can try to use this snippet:
Besides, you can use it only for specific steps by this:
Moreover, the most actions in actions' organisation use node12 as default one, that is why I think it's better to use |
@dmitry-shibanov thanks for the hint. Resolved using additional step: - name: Override NODE options for the most recent version
if: matrix.node-version == '17'
run: echo "NODE_OPTIONS=--openssl-legacy-provider" >> $GITHUB_ENV Do not forget to restore original options if you depend on other runner actions (like cache POST job). |
* docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Adjust environment variable NODE_OPTIONS for linux. Otherwise the main.yml file has to be changed according to actions/setup-node#356.
Add NODE_OPTIONS according to actions/setup-node#356 for the specific step of the workflow.
Description:
Im trying to add Node v17 into the matrix but because of known openssl bug I need to set "--openssl-legacy-provider" in NODE_OPTIONS. Using actions environment variables seems to be affected even runner which is not very recent and fails on unrecognizable option. Is there something I can do about it?
Action version:
Latest.
Platform:
Runner type:
Repro steps:
Expected behavior:
Step will end up without an error.
Actual behavior:
Step fails with:
The text was updated successfully, but these errors were encountered: