This is a GitHub Action from the Creating a JavaScript action tutorial, but:
- Also printing the Node.js version of the interpreter used to run the action.
- Currently targeting Node 16. As of this writing, new GitHub Actions should always target Node 20, but part of the goal of this action is to test the
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20
environment variable documented in GitHub Actions; All Actions will run on Node20 instead of Node16 by default and introduced to the GitHub Actions runner in #3192.
This uses code from the MIT licensed tutorial with only moderate modification. Like the code in the tutorial (whose repository is here), the code of this action is licensed under the MIT license.
See LICENSE-CODE
, which is preserved from the tutorial repository. Dependencies vendored in the node_modules
directory have their own licenses. No further restrictions are imposed.
Required The name of the person to greet. Default "World"
.
The time we greeted you.
The version of Node.js. Also printed in the greeting.
uses: EliahKagan/hello-world-javascript-action@main
with:
who-to-greet: 'Eliah'
On 17 March 2024, about 10 days after the announcement documenting it, setting FORCE_JAVASCRIPT_ACTIONS_TO_NODE20
does not seem to have any effect.
However, I wonder if the reason is that, as of this time, no new release of the runner has been made since the feature was added. Specifically:
- Recognition of that environment variable appears to have been implemented in a pull request opened on 7 March 2024, the same day as the changelog announcement, and merged on 13 March 2024.
- In contrast, the latest release of the runner as of this writing was v2.314.1 on 27 February 2024.
So my hope is that this will start working as of the next release (or very shortly thereafter as it is rolled out for use in all repositories).