Compare commits

...

15 Commits

Author SHA1 Message Date
Ethan Chiu
e0d4270cc1 Remove passing context to all composite steps attribuyte 2020-07-27 13:04:33 -04:00
Ethan Chiu
49893b6ede Merge branch 'main' of https://github.com/actions/runner into users/ethanchewy/compositeRestrictUnknownBehavior 2020-07-27 12:45:45 -04:00
Ethan Chiu
6a46ef1c47 Make shell required + add inputs 2020-07-27 12:32:32 -04:00
Ethan Chiu
a24e33bbcc Remove needs in env 2020-07-22 12:48:52 -04:00
Ethan Chiu
5dfb2cc552 revert 2020-07-21 17:55:34 -04:00
Ethan Chiu
143266bc96 Revert "Revert "Add safety check to prevent from checking defaults in ScriptHandler for composite action""
This reverts commit a22fcbc036.
2020-07-21 17:53:29 -04:00
Ethan Chiu
522fbd0546 Remove todos 2020-07-21 17:46:51 -04:00
Ethan Chiu
2bfa135739 Fix ActionManifestManager 2020-07-21 17:46:09 -04:00
Ethan Chiu
3381b951a0 Need to explictly use ActionStep type since we need the .Inputs attribute which is only found in the ActionStep not IStep 2020-07-21 17:36:40 -04:00
Ethan Chiu
a22fcbc036 Revert "Add safety check to prevent from checking defaults in ScriptHandler for composite action"
This reverts commit aeae15de7b.
2020-07-21 14:45:58 -04:00
Ethan Chiu
aeae15de7b Add safety check to prevent from checking defaults in ScriptHandler for composite action 2020-07-21 14:33:58 -04:00
Ethan Chiu
6602117989 new line 2020-07-21 13:11:46 -04:00
Ethan Chiu
89412f35bf Remove secrets + defaults 2020-07-21 11:23:25 -04:00
Ethan Chiu
220793d4e9 Add step-env 2020-07-20 17:46:02 -04:00
Ethan Chiu
645ba099b9 Explicitly define what is allowed for an action 2020-07-20 17:41:57 -04:00
2 changed files with 51 additions and 17 deletions

View File

@@ -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))

View File

@@ -108,19 +108,26 @@
}
},
"composite-steps": {
"context": [
"github",
"strategy",
"matrix",
"steps",
"inputs",
"job",
"runner",
"env",
"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": {
"type": "non-empty-string",
"required": true
}
}
}
},
"container-runs-context": {
@@ -157,6 +164,37 @@
"string": {
"require-non-empty": true
}
},
"string-steps-context": {
"context": [
"github",
"inputs",
"strategy",
"matrix",
"steps",
"job",
"runner",
"env",
"hashFiles(1,255)"
],
"string": {}
},
"step-env": {
"context": [
"github",
"inputs",
"strategy",
"matrix",
"steps",
"job",
"runner",
"env",
"hashFiles(1,255)"
],
"mapping": {
"loose-key-type": "non-empty-string",
"loose-value-type": "string"
}
}
}
}