Fix an issue where nested local composite actions did not correctly register post steps (#1433)

* Always register post steps for local actions

* Register post steps along with their conditions

* remove debug code

Co-authored-by: Ferenc Hammerl <fhammerl@github.com>
This commit is contained in:
Thomas Boop
2021-10-27 09:31:58 -04:00
committed by GitHub
parent 57dec28f68
commit 854d5e3bf3
3 changed files with 33 additions and 12 deletions

View File

@@ -50,8 +50,9 @@ namespace GitHub.Runner.Worker.Handlers
// Only register post steps for steps that actually ran
foreach (var step in Data.PostSteps.ToList())
{
if (ExecutionContext.Root.EmbeddedStepsWithPostRegistered.Contains(step.Id))
if (ExecutionContext.Root.EmbeddedStepsWithPostRegistered.ContainsKey(step.Id))
{
step.Condition = ExecutionContext.Root.EmbeddedStepsWithPostRegistered[step.Id];
steps.Add(step);
}
else