mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
Composite Code Cleanup (#1232)
* composite polish * Cleanup Condition Handling * Refactor ConditionTraceWriter * pr feedback * cleanup
This commit is contained in:
@@ -247,7 +247,10 @@ namespace GitHub.Runner.Worker
|
||||
{
|
||||
_cachedEmbeddedPreSteps[parentStepId] = new List<Pipelines.ActionStep>();
|
||||
}
|
||||
_cachedEmbeddedPreSteps[parentStepId].Add(action);
|
||||
// Clone action so we can modify the condition without affecting the original
|
||||
var clonedAction = action.Clone() as Pipelines.ActionStep;
|
||||
clonedAction.Condition = definition.Data.Execution.InitCondition;
|
||||
_cachedEmbeddedPreSteps[parentStepId].Add(clonedAction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,7 +261,10 @@ namespace GitHub.Runner.Worker
|
||||
// If we haven't done so already, add the parent to the post steps
|
||||
_cachedEmbeddedPostSteps[parentStepId] = new Stack<Pipelines.ActionStep>();
|
||||
}
|
||||
_cachedEmbeddedPostSteps[parentStepId].Push(action);
|
||||
// Clone action so we can modify the condition without affecting the original
|
||||
var clonedAction = action.Clone() as Pipelines.ActionStep;
|
||||
clonedAction.Condition = definition.Data.Execution.CleanupCondition;
|
||||
_cachedEmbeddedPostSteps[parentStepId].Push(clonedAction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user