Skip to content

Commit

Permalink
rename nestedSteps to embeddedSteps (actions#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsciple authored May 1, 2021
1 parent 7cc689b commit 419ed24
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Runner.Worker/Handlers/CompositeActionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public async Task RunAsync(ActionRunStage stage)
childScopeName = $"__{Guid.NewGuid()}";
}

// Create nested steps
var nestedSteps = new List<IStep>();
// Create embedded steps
var embeddedSteps = new List<IStep>();
foreach (Pipelines.ActionStep stepData in Data.Steps)
{
var step = HostContext.CreateService<IActionRunner>();
Expand All @@ -70,11 +70,11 @@ public async Task RunAsync(ActionRunStage stage)
// Set GITHUB_ACTION_PATH
step.ExecutionContext.SetGitHubContext("action_path", ActionDirectory);

nestedSteps.Add(step);
embeddedSteps.Add(step);
}

// Run nested steps
await RunStepsAsync(nestedSteps);
// Run embedded steps
await RunStepsAsync(embeddedSteps);

// Set outputs
ExecutionContext.ExpressionValues["inputs"] = inputsData;
Expand Down Expand Up @@ -134,16 +134,16 @@ private void ProcessOutputs()
}
}

private async Task RunStepsAsync(List<IStep> nestedSteps)
private async Task RunStepsAsync(List<IStep> embeddedSteps)
{
ArgUtil.NotNull(nestedSteps, nameof(nestedSteps));
ArgUtil.NotNull(embeddedSteps, nameof(embeddedSteps));

foreach (IStep step in nestedSteps)
foreach (IStep step in embeddedSteps)
{
Trace.Info($"Processing nested step: DisplayName='{step.DisplayName}'");
Trace.Info($"Processing embedded step: DisplayName='{step.DisplayName}'");

// Initialize env context
Trace.Info("Initialize Env context for nested step");
Trace.Info("Initialize Env context for embedded step");
#if OS_WINDOWS
var envContext = new DictionaryContextData();
#else
Expand Down Expand Up @@ -175,7 +175,7 @@ private async Task RunStepsAsync(List<IStep> nestedSteps)

try
{
// Evaluate and merge nested-step env
// Evaluate and merge embedded-step env
var templateEvaluator = step.ExecutionContext.ToPipelineTemplateEvaluator();
var actionEnvironment = templateEvaluator.EvaluateStepEnvironment(actionStep.Action.Environment, step.ExecutionContext.ExpressionValues, step.ExecutionContext.ExpressionFunctions, Common.Util.VarUtil.EnvironmentVariableKeyComparer);
foreach (var env in actionEnvironment)
Expand All @@ -186,7 +186,7 @@ private async Task RunStepsAsync(List<IStep> nestedSteps)
catch (Exception ex)
{
// Evaluation error
Trace.Info("Caught exception from expression for nested step.env");
Trace.Info("Caught exception from expression for embedded step.env");
step.ExecutionContext.Error(ex);
step.ExecutionContext.Complete(TaskResult.Failed);
}
Expand Down

0 comments on commit 419ed24

Please sign in to comment.