Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use non strict schema to allow some undefined behavior #2524

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/model/workflow.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package model

import (
"errors"
"fmt"
"io"
"reflect"
Expand Down Expand Up @@ -70,10 +71,10 @@ func (w *Workflow) OnEvent(event string) interface{} {
func (w *Workflow) UnmarshalYAML(node *yaml.Node) error {
// Validate the schema before deserializing it into our model
if err := (&schema.Node{
Definition: "workflow-root-strict",
Definition: "workflow-root",
Schema: schema.GetWorkflowSchema(),
}).UnmarshalYAML(node); err != nil {
return err
return errors.Join(err, fmt.Errorf("Actions YAML Schema Validation Error detected:\nFor more information, see https://nektosact.com/usage/schema.html."))
ChristopherHX marked this conversation as resolved.
Show resolved Hide resolved
}
type WorkflowDefault Workflow
return node.Decode((*WorkflowDefault)(w))
Expand Down
Loading