diff --git a/docs/checks/nodejs.md b/docs/checks/nodejs.md index 7308dcadc50..cbdd8659b1a 100644 --- a/docs/checks/nodejs.md +++ b/docs/checks/nodejs.md @@ -4,9 +4,9 @@ Make sure the built-in node.js has access to GitHub.com or GitHub Enterprise Server. -The runner carries its own copy of node.js executable under `/externals/node20/`. +The runner carries its own copy of node.js executable under `/externals/node16/`. -All javascript base Actions will get executed by the built-in `node` at `/externals/node20/`. +All javascript base Actions will get executed by the built-in `node` at `/externals/node16/`. > Not the `node` from `$PATH` diff --git a/src/Misc/layoutbin/runsvc.sh b/src/Misc/layoutbin/runsvc.sh index 4a86fa41695..c13564567ee 100755 --- a/src/Misc/layoutbin/runsvc.sh +++ b/src/Misc/layoutbin/runsvc.sh @@ -10,7 +10,7 @@ if [ -f ".path" ]; then echo ".path=${PATH}" fi -nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node20} +nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node16} # insert anything to setup env when running as a service # run the host process which keep the listener alive diff --git a/src/Misc/layoutbin/update.sh.template b/src/Misc/layoutbin/update.sh.template index 4d3aa359d96..4ca6b00e6b4 100755 --- a/src/Misc/layoutbin/update.sh.template +++ b/src/Misc/layoutbin/update.sh.template @@ -135,17 +135,12 @@ if [[ "$currentplatform" == 'darwin' && restartinteractiverunner -eq 0 ]]; then then # inspect the open file handles to find the node process # we can't actually inspect the process using ps because it uses relative paths and doesn't follow symlinks - nodever="node20" + nodever="node16" path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-) - if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node16 + if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12 then - nodever="node16" + nodever="node12" path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-) - if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12 - then - nodever="node12" - path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-) - fi fi if [[ $? -eq 0 && -n "$path" ]] then diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs index e4d2cfc0a7d..177e3c98f3f 100644 --- a/src/Runner.Common/Constants.cs +++ b/src/Runner.Common/Constants.cs @@ -257,7 +257,7 @@ public static class Agent { public static readonly string ToolsDirectory = "agent.ToolsDirectory"; - // Set this env var to "node16" to downgrade the node version for internal functions (e.g hashfiles). This does NOT affect the version of node actions. + // Set this env var to "node12" to downgrade the node version for internal functions (e.g hashfiles). This does NOT affect the version of node actions. public static readonly string ForcedInternalNodeVersion = "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION"; public static readonly string ForcedActionsNodeVersion = "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION"; public static readonly string PrintLogToStdout = "ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT"; diff --git a/src/Runner.Common/Util/NodeUtil.cs b/src/Runner.Common/Util/NodeUtil.cs index 5dddc13162f..f2c01d7d311 100644 --- a/src/Runner.Common/Util/NodeUtil.cs +++ b/src/Runner.Common/Util/NodeUtil.cs @@ -5,7 +5,7 @@ namespace GitHub.Runner.Common.Util { public static class NodeUtil { - private const string _defaultNodeVersion = "node20"; + private const string _defaultNodeVersion = "node16"; public static readonly ReadOnlyCollection BuiltInNodeVersions = new(new[] { "node16", "node20" }); public static string GetInternalNodeVersion() { diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index 46262b01a89..9ed9faeb024 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -836,6 +836,7 @@ public void InitializeJob(Pipelines.AgentJobRequestMessage message, Cancellation // Actions environment ActionsEnvironment = message.ActionsEnvironment; + // Service container info Global.ServiceContainers = new List();