mirror of
https://gitea.com/gitea/runner.git
synced 2026-08-27 22:37:46 +00:00
fix handle missing yaml.ScalarNode (#129)
This bug was reported on https://github.com/go-gitea/gitea/issues/33657 Rewrite of (see below) was missing in this commit https://gitea.com/gsvd/act/commit/6cdf1e5788dbfa8fe9787a07178c28b64837a61f ```go case string: acts[act] = []string{b} ``` Reviewed-on: https://gitea.com/gitea/act/pulls/129 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Guillaume S. <me@gsvd.dev> Co-committed-by: Guillaume S. <me@gsvd.dev>
This commit is contained in:
@@ -405,6 +405,13 @@ func ParseRawOn(rawOn *yaml.Node) ([]*Event, error) {
|
||||
return nil, err
|
||||
}
|
||||
acts[act] = t
|
||||
case yaml.ScalarNode:
|
||||
var t string
|
||||
err := content.Decode(&t)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
acts[act] = []string{t}
|
||||
case yaml.MappingNode:
|
||||
if k != "workflow_dispatch" || act != "inputs" {
|
||||
return nil, fmt.Errorf("map should only for workflow_dispatch but %s: %#v", act, content)
|
||||
|
||||
Reference in New Issue
Block a user