Replace expressions engine (#133)

This commit is contained in:
ChristopherHX
2025-10-06 13:53:15 +02:00
committed by GitHub
parent 418c708bb0
commit 82dccc7820
40 changed files with 6876 additions and 1304 deletions

View File

@@ -69,6 +69,9 @@ func (w *Workflow) OnEvent(event string) interface{} {
}
func (w *Workflow) UnmarshalYAML(node *yaml.Node) error {
if err := resolveAliases(node); err != nil {
return err
}
// Validate the schema before deserializing it into our model
if err := (&schema.Node{
Definition: "workflow-root",
@@ -76,9 +79,6 @@ func (w *Workflow) UnmarshalYAML(node *yaml.Node) error {
}).UnmarshalYAML(node); err != nil {
return errors.Join(err, fmt.Errorf("actions YAML Schema Validation Error detected:\nFor more information, see: https://actions-oss.github.io/act-docs/usage/schema.html"))
}
if err := resolveAliases(node); err != nil {
return err
}
type WorkflowDefault Workflow
return node.Decode((*WorkflowDefault)(w))
}
@@ -86,6 +86,9 @@ func (w *Workflow) UnmarshalYAML(node *yaml.Node) error {
type WorkflowStrict Workflow
func (w *WorkflowStrict) UnmarshalYAML(node *yaml.Node) error {
if err := resolveAliases(node); err != nil {
return err
}
// Validate the schema before deserializing it into our model
if err := (&schema.Node{
Definition: "workflow-root-strict",
@@ -93,9 +96,6 @@ func (w *WorkflowStrict) UnmarshalYAML(node *yaml.Node) error {
}).UnmarshalYAML(node); err != nil {
return errors.Join(err, fmt.Errorf("actions YAML Strict Schema Validation Error detected:\nFor more information, see: https://nektosact.com/usage/schema.html"))
}
if err := resolveAliases(node); err != nil {
return err
}
type WorkflowDefault Workflow
return node.Decode((*WorkflowDefault)(w))
}