From fc57c796ce1a6c55183988f42c5ce9778a2d481e Mon Sep 17 00:00:00 2001 From: Thomas Boop Date: Tue, 3 Aug 2021 21:46:15 +0000 Subject: [PATCH] set context name for pre/post steps for composite actions --- src/Runner.Worker/ExecutionContext.cs | 6 +++--- src/Runner.Worker/JobExtension.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index 61ee9d2c7..e40a5cf07 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -272,7 +272,7 @@ namespace GitHub.Runner.Worker return; } - step.ExecutionContext = Root.CreatePostChild(step.DisplayName, IntraActionState); + step.ExecutionContext = Root.CreatePostChild(step.DisplayName, IntraActionState, this.ScopeName); Root.PostJobSteps.Push(step); } @@ -914,7 +914,7 @@ namespace GitHub.Runner.Worker } } - private IExecutionContext CreatePostChild(string displayName, Dictionary intraActionState) + private IExecutionContext CreatePostChild(string displayName, Dictionary intraActionState, string scopeName) { if (!_expandedForPostJob) { @@ -924,7 +924,7 @@ namespace GitHub.Runner.Worker } var newGuid = Guid.NewGuid(); - return CreateChild(newGuid, displayName, newGuid.ToString("N"), null, null, intraActionState, _childTimelineRecordOrder - Root.PostJobSteps.Count); + return CreateChild(newGuid, displayName, newGuid.ToString("N"), null, scopeName, intraActionState, _childTimelineRecordOrder - Root.PostJobSteps.Count); } } diff --git a/src/Runner.Worker/JobExtension.cs b/src/Runner.Worker/JobExtension.cs index 613f408bd..b333d5d4e 100644 --- a/src/Runner.Worker/JobExtension.cs +++ b/src/Runner.Worker/JobExtension.cs @@ -312,7 +312,7 @@ namespace GitHub.Runner.Worker { ArgUtil.NotNull(actionStep, step.DisplayName); Guid stepId = Guid.NewGuid(); - actionStep.ExecutionContext = jobContext.CreateChild(stepId, actionStep.DisplayName, stepId.ToString("N"), null, null, intraActionStates[actionStep.Action.Id]); + actionStep.ExecutionContext = jobContext.CreateChild(stepId, actionStep.DisplayName, stepId.ToString("N"), null, actionStep.Action.ContextName, intraActionStates[actionStep.Action.Id]); } }