diff --git a/act/schema/action_schema.json b/act/schema/action_schema.json index 4e804a3e..3b2ebdfe 100644 --- a/act/schema/action_schema.json +++ b/act/schema/action_schema.json @@ -166,6 +166,7 @@ "context": [ "forge", "github", + "env", "strategy", "matrix", "job", diff --git a/act/schema/schema_test.go b/act/schema/schema_test.go index 30fc9d13..cd7e6640 100644 --- a/act/schema/schema_test.go +++ b/act/schema/schema_test.go @@ -120,3 +120,32 @@ jobs: } require.NoError(t, n.UnmarshalYAML(&node)) } + +func TestActionSchema(t *testing.T) { + var node yaml.Node + err := yaml.Unmarshal([]byte(` +name: 'action name' +author: 'action authors' +description: | + action description +inputs: + url: + description: 'url description' + default: '${{ env.GITHUB_SERVER_URL }}' + repo: + description: 'repo description' + default: '${{ github.repository }}' +runs: + using: "composite" + steps: + - run: echo "${{ github.action_path }}" +`), &node) + if !assert.NoError(t, err) { + return + } + err = (&Node{ + Definition: "action-root", + Schema: GetActionSchema(), + }).UnmarshalYAML(&node) + assert.NoError(t, err) +}