{"record":{"id":"78e7d4e9378c4617","repo":"nektos/act","slug":"unknown-function-call-s","errorCode":null,"errorMessage":"Unknown Function Call %s","messagePattern":"Unknown Function Call (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/schema/schema.go","lineNumber":153,"sourceCode":"\t}\n\n\tfuncs := s.GetFunctions()\n\n\tvar err error\n\tactionlint.VisitExprNode(exprNode, func(node, _ actionlint.ExprNode, entering bool) {\n\t\tif funcCallNode, ok := node.(*actionlint.FuncCallNode); entering && ok {\n\t\t\tfor _, v := range *funcs {\n\t\t\t\tif strings.EqualFold(funcCallNode.Callee, v.name) {\n\t\t\t\t\tif v.min > len(funcCallNode.Args) {\n\t\t\t\t\t\terr = errors.Join(err, fmt.Errorf(\"Missing parameters for %s expected >= %v got %v\", funcCallNode.Callee, v.min, len(funcCallNode.Args)))\n\t\t\t\t\t}\n\t\t\t\t\tif v.max < len(funcCallNode.Args) {\n\t\t\t\t\t\terr = errors.Join(err, fmt.Errorf(\"Too many parameters for %s expected <= %v got %v\", funcCallNode.Callee, v.max, len(funcCallNode.Args)))\n\t\t\t\t\t}\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\terr = errors.Join(err, fmt.Errorf(\"Unknown Function Call %s\", funcCallNode.Callee))\n\t\t}\n\t\tif varNode, ok := node.(*actionlint.VariableNode); entering && ok {\n\t\t\tfor _, v := range s.Context {\n\t\t\t\tif strings.EqualFold(varNode.Name, v) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\terr = errors.Join(err, fmt.Errorf(\"Unknown Variable Access %s\", varNode.Name))\n\t\t}\n\t})\n\treturn err\n}\n\nfunc (s *Node) GetFunctions() *[]FunctionInfo {\n\tfuncs := &[]FunctionInfo{}\n\tAddFunction(funcs, \"contains\", 2, 2)\n\tAddFunction(funcs, \"endsWith\", 2, 2)\n\tAddFunction(funcs, \"format\", 1, 255)","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/schema/schema.go#L135-L171","documentation":"Validation error from checkSingleExpression in pkg/schema/schema.go: the expression calls a function whose name does not case-insensitively match any entry in the local function table returned by Node.GetFunctions(). The table only covers a subset of GitHub's expression functions, so a valid GitHub function missing from the table is reported as unknown.","triggerScenarios":"Any ${{ someFunc(...) }} where someFunc is not in the AddFunction list (contains, endsWith, format, join, startsWith, toJSON, fromJSON, hashFiles, etc. as registered). Also plain typos like ${{ tojson(...) }} only pass if the table registers that spelling.","commonSituations":"Typos in function names (toLower vs toLower correct spelling, hashFile vs hashFiles); using a newer GitHub function not yet in act's table; case variations that the table doesn't cover.","solutions":["Fix the function name spelling to a registered one (see GetFunctions in schema.go)","If the function genuinely exists on GitHub Actions but is missing from act's table, open an issue or add it via AddFunction in a fork","Replace the unsupported call with an equivalent registered function or move logic into the run step (shell)"],"exampleFix":"# before:\nif: ${{ hashFile('**/go.sum') }}\n# after:\nif: ${{ hashFiles('**/go.sum') }}","handlingStrategy":"validation","validationCode":"// Cross-check every function name against act's registered list:\n// contains, endsWith, format, join, startsWith, toJSON, fromJSON, hashFiles (see GetFunctions)","typeGuard":null,"tryCatchPattern":"Fatal validation error; correct the function name or add it to the schema table in a fork.","preventionTips":["Spell function names exactly as GitHub documents them (camelCase, e.g. hashFiles)","If a real GitHub function is rejected, check act's issue tracker — the table may lag behind","Lint with actionlint which tracks the full function set"],"tags":["go","act","schema-validation","expressions","unknown-function"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}