From 2e85fd680e49da9772e54e69e116ddc6266149ee Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Mon, 3 Aug 2020 21:25:14 -0400 Subject: [PATCH] Fix Condition for Setting GITHUB_ACTION --- src/Runner.Worker/Handlers/CompositeActionHandler.cs | 2 +- src/Runner.Worker/StepsRunner.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Runner.Worker/Handlers/CompositeActionHandler.cs b/src/Runner.Worker/Handlers/CompositeActionHandler.cs index e6ac600d5..e83b5fb67 100644 --- a/src/Runner.Worker/Handlers/CompositeActionHandler.cs +++ b/src/Runner.Worker/Handlers/CompositeActionHandler.cs @@ -61,7 +61,7 @@ namespace GitHub.Runner.Worker.Handlers var compositeGitHubContext = new GitHubContext(); foreach (var pair in githubContext) { - compositeGitHubContext[pair.Key] = pair.Value.Clone(); + compositeGitHubContext[pair.Key] = pair.Value; } foreach (Pipelines.ActionStep actionStep in actionSteps) diff --git a/src/Runner.Worker/StepsRunner.cs b/src/Runner.Worker/StepsRunner.cs index 40430b694..8de680309 100644 --- a/src/Runner.Worker/StepsRunner.cs +++ b/src/Runner.Worker/StepsRunner.cs @@ -108,11 +108,11 @@ namespace GitHub.Runner.Worker // the server will never send an empty context name. Generated context names start with "__" if (step.ExecutionContext.Global.Variables.GetBoolean("DistributedTask.UseContextNameForGITHUBACTION") ?? false) { - step.ExecutionContext.SetGitHubContext("action", actionStep.Action.Name); + step.ExecutionContext.SetGitHubContext("action", step.ExecutionContext.GetFullyQualifiedContextName()); } else { - step.ExecutionContext.SetGitHubContext("action", step.ExecutionContext.GetFullyQualifiedContextName()); + step.ExecutionContext.SetGitHubContext("action", actionStep.Action.Name); } try