diff --git a/src/Runner.Worker/ActionManifestManager.cs b/src/Runner.Worker/ActionManifestManager.cs index bb9aef43c..af7ee666f 100644 --- a/src/Runner.Worker/ActionManifestManager.cs +++ b/src/Runner.Worker/ActionManifestManager.cs @@ -470,6 +470,7 @@ namespace GitHub.Runner.Worker { if (stepsLoaded == null) { + // TODO: Add a more helpful error message + including file name, etc. to show user that it's because of their yaml file throw new ArgumentNullException($"No steps provided."); } else diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index b859c913a..b49fab72b 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -282,7 +282,7 @@ namespace GitHub.Runner.Worker // If the key already exists, we override it since the composite action env variables will have higher precedence // Note that for each composite action step, it's environment variables will be set in the StepRunner automatically step.ExecutionContext.SetEnvironmentVariables(envData); - Root.JobSteps.Insert(0, step); + Root.JobSteps.Insert(location, step); } public void SetEnvironmentVariables(Dictionary dict) diff --git a/src/Runner.Worker/Handlers/CompositeActionHandler.cs b/src/Runner.Worker/Handlers/CompositeActionHandler.cs index 45e055faf..6fb543b79 100644 --- a/src/Runner.Worker/Handlers/CompositeActionHandler.cs +++ b/src/Runner.Worker/Handlers/CompositeActionHandler.cs @@ -1,15 +1,16 @@ +using System; +using System.Collections.Generic; using System.IO; +using System.Linq; using System.Text; using System.Threading.Tasks; +using GitHub.DistributedTask.ObjectTemplating.Tokens; +using GitHub.DistributedTask.Pipelines.ContextData; +using GitHub.DistributedTask.WebApi; using GitHub.Runner.Common; using GitHub.Runner.Sdk; -using GitHub.DistributedTask.WebApi; using Pipelines = GitHub.DistributedTask.Pipelines; -using System; -using System.Linq; -using GitHub.DistributedTask.ObjectTemplating.Tokens; -using System.Collections.Generic; -using GitHub.DistributedTask.Pipelines.ContextData; + namespace GitHub.Runner.Worker.Handlers { diff --git a/src/Runner.Worker/action_yaml.json b/src/Runner.Worker/action_yaml.json index 03ceca84e..a8ec3a2e4 100644 --- a/src/Runner.Worker/action_yaml.json +++ b/src/Runner.Worker/action_yaml.json @@ -105,6 +105,10 @@ "job", "runner", "env", + "always(0,0)", + "failure(0,0)", + "cancelled(0,0)", + "success(0,0)", "hashFiles(1,255)" ], "sequence": {