{"record":{"id":"1e7314ef98c01c8a","repo":"nektos/act","slug":"actions-yaml-strict-schema-validation-error-detect","errorCode":null,"errorMessage":"Actions YAML Strict Schema Validation Error detected:\\nFor more information, see: https://nektosact.com/usage/schema.html","messagePattern":"Actions YAML Strict Schema Validation Error detected:\\\\nFor more information, see: https://nektosact\\.com/usage/schema\\.html","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/workflow.go","lineNumber":99,"sourceCode":"\t\treturn errors.Join(err, fmt.Errorf(\"Actions YAML Schema Validation Error detected:\\nFor more information, see: https://nektosact.com/usage/schema.html\"))\n\t}\n\ttype WorkflowDefault Workflow\n\treturn node.Decode((*WorkflowDefault)(w))\n}\n\ntype WorkflowStrict Workflow\n\nfunc (w *WorkflowStrict) UnmarshalYAML(node *yaml.Node) error {\n\t// Resolve yaml anchor aliases first\n\tif err := resolveAliases(node); err != nil {\n\t\treturn err\n\t}\n\t// Validate the schema before deserializing it into our model\n\tif err := (&schema.Node{\n\t\tDefinition: \"workflow-root-strict\",\n\t\tSchema:     schema.GetWorkflowSchema(),\n\t}).UnmarshalYAML(node); err != nil {\n\t\treturn errors.Join(err, fmt.Errorf(\"Actions YAML Strict Schema Validation Error detected:\\nFor more information, see: https://nektosact.com/usage/schema.html\"))\n\t}\n\ttype WorkflowDefault Workflow\n\treturn node.Decode((*WorkflowDefault)(w))\n}\n\ntype WorkflowDispatchInput struct {\n\tDescription string   `yaml:\"description\"`\n\tRequired    bool     `yaml:\"required\"`\n\tDefault     string   `yaml:\"default\"`\n\tType        string   `yaml:\"type\"`\n\tOptions     []string `yaml:\"options\"`\n}\n\ntype WorkflowDispatch struct {\n\tInputs map[string]WorkflowDispatchInput `yaml:\"inputs\"`\n}\n\nfunc (w *Workflow) WorkflowDispatchConfig() *WorkflowDispatch {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/model/workflow.go#L81-L117","documentation":"WorkflowStrict.UnmarshalYAML behaves like the non-strict version but validates against the workflow-root-strict schema definition, which additionally rejects unknown/extra keys that normal GitHub parsing silently ignores. Strict mode is opt-in (e.g. the strict planner path) and surfaces latent workflow issues as hard errors.","triggerScenarios":"Enabling strict reading (ReadWorkflow with strict=true / WorkflowStrict) on a workflow containing deprecated or non-schema keys, such as old `::` syntax remnants, unknown job-level keys, or environment shortcuts the strict schema disallows.","commonSituations":"Running act in strict mode on legacy workflows; CI linting that turns on strictness; workflows that run fine on GitHub but carry extra keys.","solutions":["Remove the unknown/extra keys named in the joined schema errors.","Migrate deprecated syntax flagged by strict validation to the modern equivalent.","If the extra keys are harmless, re-run without strict mode until the workflow is cleaned up."],"exampleFix":"# before (strict rejects unknown key)\njobs:\n  build:\n    runs-on: ubuntu-latest\n    continiue-on-error: false\n# after\njobs:\n  build:\n    runs-on: ubuntu-latest\n    continue-on-error: false","handlingStrategy":"validation","validationCode":"// smoke-test strict parsing before enabling strict mode broadly\n_, err := model.ReadWorkflowStrict(bytes.NewReader(raw))\nif err != nil { return fmt.Errorf(\"strict validation failed: %w\", err) }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"Strict Schema Validation Error\") {\n    // unwrap joined errors; remove or correct each flagged key, then re-run\n}","preventionTips":["Adopt strict mode gradually: run it in CI as advisory before making it blocking.","Delete dead/deprecated keys during periodic workflow cleanup.","Prefer actlint/actionlint plus strict act parse in pre-commit hooks."],"tags":["workflow","schema","strict","validation"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}