1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

fix: allow using the env context in actions defaults (#204)

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/204
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
Earl Warren 2025-07-27 15:24:49 +00:00 committed by earl-warren
parent 57524e90f1
commit 34939ad5f4
2 changed files with 30 additions and 0 deletions

View file

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