Compare commits

...

2 Commits

Author SHA1 Message Date
Tingluo Huang
fcc6c28743 . 2024-10-09 11:13:14 -04:00
Tingluo Huang
ee310e18b8 Not allow opt-out for node20 enforcement. 2024-10-09 11:13:14 -04:00

View File

@@ -96,6 +96,18 @@ namespace GitHub.Runner.Worker.Handlers
var isLocalOptOut = StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable(Constants.Variables.Actions.AllowActionsUseUnsecureNodeVersion));
bool isOptOut = isWorkflowOptOutSet ? StringUtil.ConvertToBoolean(workflowOptOut) : isLocalOptOut;
if (isOptOut && (executionContext.Global.Variables.GetBoolean("DistributedTask.NotAllowOptOutForNode20") ?? false))
{
executionContext.Global.JobTelemetry.Add(new JobTelemetry()
{
Type = JobTelemetryType.General,
Message = $"Not allowing opt out for node20 in step {executionContext.Id}"
});
Trace.Info("Not allowing opt out for node20");
executionContext.Warning("End of life for Actions Node16. For more info: https://github.blog/changelog/2024-09-25-end-of-life-for-actions-node16/");
isOptOut = false;
}
if (!isOptOut)
{
var repoAction = action as Pipelines.RepositoryPathReference;