Skip to content

Commit 9d516e8

Browse files
fix: use non strict schema to allow some undefined behavior (#30)
* GitHub Actions doesn't use the newer strict schema in the service * Tolerate more hallucinations --------- Co-authored-by: Josh Soref <[email protected]>
1 parent f28c532 commit 9d516e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/model/workflow.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package model
22

33
import (
4+
"errors"
45
"fmt"
56
"io"
67
"reflect"
@@ -70,10 +71,10 @@ func (w *Workflow) OnEvent(event string) interface{} {
7071
func (w *Workflow) UnmarshalYAML(node *yaml.Node) error {
7172
// Validate the schema before deserializing it into our model
7273
if err := (&schema.Node{
73-
Definition: "workflow-root-strict",
74+
Definition: "workflow-root",
7475
Schema: schema.GetWorkflowSchema(),
7576
}).UnmarshalYAML(node); err != nil {
76-
return err
77+
return errors.Join(err, fmt.Errorf("Actions YAML Schema Validation Error detected:\nFor more information, see: https://nektosact.com/usage/schema.html"))
7778
}
7879
type WorkflowDefault Workflow
7980
return node.Decode((*WorkflowDefault)(w))

0 commit comments

Comments
 (0)