mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
Explicitly define what is allowed for a composite action (#605)
* Explicitly define what is allowed for an action * Add step-env * Remove secrets + defaults * new line * Add safety check to prevent from checking defaults in ScriptHandler for composite action * Revert "Add safety check to prevent from checking defaults in ScriptHandler for composite action" This reverts commitaeae15de7b. * Need to explictly use ActionStep type since we need the .Inputs attribute which is only found in the ActionStep not IStep * Fix ActionManifestManager * Remove todos * Revert "Revert "Add safety check to prevent from checking defaults in ScriptHandler for composite action"" This reverts commita22fcbc036. * revert * Remove needs in env * Make shell required + add inputs * Remove passing context to all composite steps attribuyte
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user