Fix Condition for Setting GITHUB_ACTION

This commit is contained in:
Ethan Chiu
2020-08-03 21:25:14 -04:00
parent 2838dfa45c
commit 2e85fd680e
2 changed files with 3 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ namespace GitHub.Runner.Worker.Handlers
var compositeGitHubContext = new GitHubContext(); var compositeGitHubContext = new GitHubContext();
foreach (var pair in githubContext) foreach (var pair in githubContext)
{ {
compositeGitHubContext[pair.Key] = pair.Value.Clone(); compositeGitHubContext[pair.Key] = pair.Value;
} }
foreach (Pipelines.ActionStep actionStep in actionSteps) foreach (Pipelines.ActionStep actionStep in actionSteps)

View File

@@ -108,11 +108,11 @@ namespace GitHub.Runner.Worker
// the server will never send an empty context name. Generated context names start with "__" // the server will never send an empty context name. Generated context names start with "__"
if (step.ExecutionContext.Global.Variables.GetBoolean("DistributedTask.UseContextNameForGITHUBACTION") ?? false) if (step.ExecutionContext.Global.Variables.GetBoolean("DistributedTask.UseContextNameForGITHUBACTION") ?? false)
{ {
step.ExecutionContext.SetGitHubContext("action", actionStep.Action.Name); step.ExecutionContext.SetGitHubContext("action", step.ExecutionContext.GetFullyQualifiedContextName());
} }
else else
{ {
step.ExecutionContext.SetGitHubContext("action", step.ExecutionContext.GetFullyQualifiedContextName()); step.ExecutionContext.SetGitHubContext("action", actionStep.Action.Name);
} }
try try