{"record":{"id":"8e138a4c4308f6eb","repo":"nektos/act","slug":"sexpected-one-of-s-got-s","errorCode":null,"errorMessage":"%sExpected one of %s got %s","messagePattern":"(.+?)Expected one of (.+?) got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/schema/schema.go","lineNumber":280,"sourceCode":"\t\treturn fmt.Errorf(\"%sExpected a scalar got %v\", formatLocation(node), getStringKind(node.Kind))\n\t}\n\n\tif def.String != nil {\n\t\treturn s.checkString(node, def)\n\t} else if def.Number != nil {\n\t\tvar num float64\n\t\treturn node.Decode(&num)\n\t} else if def.Boolean != nil {\n\t\tvar b bool\n\t\treturn node.Decode(&b)\n\t} else if def.AllowedValues != nil {\n\t\ts := node.Value\n\t\tfor _, v := range *def.AllowedValues {\n\t\t\tif s == v {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\t\treturn fmt.Errorf(\"%sExpected one of %s got %s\", formatLocation(node), strings.Join(*def.AllowedValues, \",\"), s)\n\t} else if def.Null != nil {\n\t\tvar myNull *byte\n\t\treturn node.Decode(&myNull)\n\t}\n\treturn errors.ErrUnsupported\n}\n\nfunc (s *Node) checkString(node *yaml.Node, def Definition) error {\n\tval := node.Value\n\tif def.String.Constant != \"\" && def.String.Constant != val {\n\t\treturn fmt.Errorf(\"%sExpected %s got %s\", formatLocation(node), def.String.Constant, val)\n\t}\n\tif def.String.IsExpression {\n\t\tparser := actionlint.NewExprParser()\n\t\tlexer := actionlint.NewExprLexer(val + \"}}\")\n\t\texprNode, parseErr := parser.Parse(lexer)\n\t\tif parseErr != nil {\n\t\t\treturn fmt.Errorf(\"%sFailed to parse: %s\", formatLocation(node), parseErr.Message)","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/schema/schema.go#L262-L298","documentation":"Enum error from Node.checkScalar (schema.go:280): the schema declares an AllowedValues list and the scalar's value does not match any entry. The expected list is joined with commas and the actual value appended.","triggerScenarios":"Setting a constrained field to an out-of-list value, e.g. `runs-on: notalabel` when the schema restricts to ubuntu-latest/macos-latest, or a misspelled boolean-like enum value.","commonSituations":"Typos in enum fields; self-hosted runner labels not present in the schema's allowed list; newer GitHub values not yet added to act's schema.","solutions":["Change the value to one of the comma-separated options shown in the error","If the value is valid on GitHub but missing from act's schema, update the schema JSON or report an issue","Quote the value to ensure YAML does not reinterpret it (true/false/null coercion)"],"exampleFix":"# before:\nruns-on: ubutnu-latest\n# after:\nruns-on: ubuntu-latest","handlingStrategy":"validation","validationCode":"// Validate enum-ish fields against your org's allowed list before committing, mirroring schema AllowedValues","typeGuard":null,"tryCatchPattern":"Deterministic validation failure — pick a value from the comma list in the message.","preventionTips":["Copy enum values (runner labels, event names) from docs, not memory","Quote strings like 'true'/'on' so YAML does not coerce them","Update act if a legitimate new enum value is rejected"],"tags":["go","act","schema-validation","enum","yaml"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}