Change JobSteps to a List, Change Register Step function name

This commit is contained in:
Ethan Chiu
2020-06-19 14:29:48 -04:00
parent 941a24ee37
commit 9939cf527e
4 changed files with 20 additions and 65 deletions

View File

@@ -45,7 +45,7 @@ namespace GitHub.Runner.Worker.Handlers
}
// Add each composite action step to the front of the queue
var compositeActionSteps = new Queue<IStep>();
int location = 0;
foreach (Pipelines.ActionStep aStep in actionSteps)
{
// Ex:
@@ -63,7 +63,7 @@ namespace GitHub.Runner.Worker.Handlers
// - run echo hello world 3 (d)
// - run echo hello world 4 (e)
//
// Stack (LIFO) [Bottom => Middle => Top]:
// Steps processed as follow:
// | a |
// | a | => | d |
// (Run step d)
@@ -86,9 +86,9 @@ namespace GitHub.Runner.Worker.Handlers
// TODO: Do we need to add any context data from the job message?
// (See JobExtension.cs ~line 236)
compositeActionSteps.Enqueue(ExecutionContext.RegisterCompositeStep(actionRunner, inputsData));
ExecutionContext.RegisterNestedStep(actionRunner, inputsData, location);
location++;
}
ExecutionContext.EnqueueAllCompositeSteps(compositeActionSteps);
return Task.CompletedTask;
}