diff --git a/src/Runner.Worker/Handlers/ScriptHandler.cs b/src/Runner.Worker/Handlers/ScriptHandler.cs index 397d9a176..022b59420 100644 --- a/src/Runner.Worker/Handlers/ScriptHandler.cs +++ b/src/Runner.Worker/Handlers/ScriptHandler.cs @@ -164,8 +164,6 @@ namespace GitHub.Runner.Worker.Handlers string workingDirectory = null; if (!Inputs.TryGetValue("workingDirectory", out workingDirectory)) { - // TODO: figure out how defaults interact with template later - // for now, we won't check job.defaults if we are inside a template. if (string.IsNullOrEmpty(ExecutionContext.ScopeName) && ExecutionContext.Global.JobDefaults.TryGetValue("run", out var runDefaults)) { if (runDefaults.TryGetValue("working-directory", out workingDirectory)) @@ -180,8 +178,6 @@ namespace GitHub.Runner.Worker.Handlers string shell = null; if (!Inputs.TryGetValue("shell", out shell) || string.IsNullOrEmpty(shell)) { - // TODO: figure out how defaults interact with template later - // for now, we won't check job.defaults if we are inside a template. if (string.IsNullOrEmpty(ExecutionContext.ScopeName) && ExecutionContext.Global.JobDefaults.TryGetValue("run", out var runDefaults)) { if (runDefaults.TryGetValue("shell", out shell)) diff --git a/src/Runner.Worker/action_yaml.json b/src/Runner.Worker/action_yaml.json index 82b24a695..a36a900bc 100644 --- a/src/Runner.Worker/action_yaml.json +++ b/src/Runner.Worker/action_yaml.json @@ -120,7 +120,22 @@ "hashFiles(1,255)" ], "sequence": { - "item-type": "any" + "item-type": "composite-step" + } + }, + "composite-step": { + "mapping": { + "properties": { + "name": "string-steps-context", + "id": "non-empty-string", + "run": { + "type": "string-steps-context", + "required": true + }, + "env": "step-env", + "working-directory": "string-steps-context", + "shell": "string-steps-context" + } } }, "container-runs-context": { @@ -157,6 +172,35 @@ "string": { "require-non-empty": true } + }, + "string-steps-context": { + "context": [ + "github", + "strategy", + "matrix", + "steps", + "job", + "runner", + "env", + "hashFiles(1,255)" + ], + "string": {} + }, + "step-env": { + "context": [ + "github", + "strategy", + "matrix", + "steps", + "job", + "runner", + "env", + "hashFiles(1,255)" + ], + "mapping": { + "loose-key-type": "non-empty-string", + "loose-value-type": "string" + } } } -} \ No newline at end of file +}