Add ability to enforce actions to run on node20 (#3192)

Add options to enforce actions execute on node20
This commit is contained in:
Tatyana Kostromskaya
2024-03-14 14:12:08 +01:00
committed by GitHub
parent 2c8c941622
commit 692d910868
4 changed files with 61 additions and 0 deletions

View File

@@ -118,6 +118,11 @@ namespace GitHub.Runner.Worker.Handlers
{
Data.NodeVersion = "node16";
}
if (forcedNodeVersion == "node20" && Data.NodeVersion != "node20")
{
Data.NodeVersion = "node20";
}
var nodeRuntimeVersion = await StepHost.DetermineNodeRuntimeVersion(ExecutionContext, Data.NodeVersion);
string file = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Externals), nodeRuntimeVersion, "bin", $"node{IOUtil.ExeExtension}");