nektos/act · error
Missing parameters for %s expected >= %v got %v
Error message
Missing parameters for %s expected >= %v got %v
What it means
Validation error from checkSingleExpression in pkg/schema/schema.go when a function call inside a ${{ }} expression has fewer arguments than the function's declared minimum arity (from the GetFunctions table, e.g. contains/endsWith/startsWith need exactly 2, format needs >=1).
Source
Thrown at pkg/schema/schema.go:145
switch exprNode.Token().Kind {
case actionlint.TokenKindInt:
case actionlint.TokenKindFloat:
case actionlint.TokenKindString:
return nil
default:
return fmt.Errorf("expressions are not allowed here")
}
}
funcs := s.GetFunctions()
var err error
actionlint.VisitExprNode(exprNode, func(node, _ actionlint.ExprNode, entering bool) {
if funcCallNode, ok := node.(*actionlint.FuncCallNode); entering && ok {
for _, v := range *funcs {
if strings.EqualFold(funcCallNode.Callee, v.name) {
if v.min > len(funcCallNode.Args) {
err = errors.Join(err, fmt.Errorf("Missing parameters for %s expected >= %v got %v", funcCallNode.Callee, v.min, len(funcCallNode.Args)))
}
if v.max < len(funcCallNode.Args) {
err = errors.Join(err, fmt.Errorf("Too many parameters for %s expected <= %v got %v", funcCallNode.Callee, v.max, len(funcCallNode.Args)))
}
return
}
}
err = errors.Join(err, fmt.Errorf("Unknown Function Call %s", funcCallNode.Callee))
}
if varNode, ok := node.(*actionlint.VariableNode); entering && ok {
for _, v := range s.Context {
if strings.EqualFold(varNode.Name, v) {
return
}
}
err = errors.Join(err, fmt.Errorf("Unknown Variable Access %s", varNode.Name))
}
})View on GitHub (pinned to 4f41128141)
Solutions
- Add the missing argument(s) — check the arity table in schema.go GetFunctions (contains/endsWith/startsWith: 2, format: >=1, join: 1-2)
- Validate the workflow with actionlint or `act` schema validation before committing
- Test the expression in a scratch workflow step to confirm it evaluates
Example fix
# before:
if: ${{ startsWith(github.ref) }}
# after:
if: ${{ startsWith(github.ref, 'refs/tags/') }} Defensive patterns
Strategy: validation
Validate before calling
// Verify arity against act's table before shipping the workflow:
var arity = map[string][2]int{"contains": {2, 2}, "endsWith": {2, 2}, "format": {1, 255}, "join": {1, 2}, "startsWith": {2, 2}}
// ensure len(args) is within [min, max] for every call you write Try / catch
Fail validation with the message included; no retry. Fix the expression and re-validate.
Prevention
- Copy function signatures from the GitHub expressions docs
- Run actionlint locally — it catches arity errors at lint time
- Add a CI step that lints all workflows in .github/workflows
When it happens
Trigger: Calling a known expression function with too few args: ${{ contains() }}, ${{ startsWith(github.ref) }}, ${{ join() }}. The check compares v.min > len(funcCallNode.Args) using actionlint's parsed AST.
Common situations: Typos or copy-paste mistakes in workflow expressions; writing expressions against GitHub docs but forgetting an argument; refactoring an expression and dropping a parameter.
Related errors
- Too many parameters for %s expected <= %v got %v
- expressions are not allowed here
- Unknown Function Call %s
- Unknown Variable Access %s
- %sFailed to parse: %s
AI-assisted analysis of nektos/act@4f41128141 (2026-08-15).
Data as JSON: /api/errors/d1a79dca0c85aa68.
Report an issue: GitHub.