{"record":{"id":"6984e8d90b7b4651","repo":"nektos/act","slug":"unavailable-context-jobs","errorCode":null,"errorMessage":"Unavailable context: jobs","messagePattern":"Unavailable context: jobs","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/exprparser/interpreter.go","lineNumber":163,"sourceCode":"\t\treturn impl.evaluateLogicalCompare(node)\n\tcase *actionlint.FuncCallNode:\n\t\treturn impl.evaluateFuncCall(node)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"Fatal error! Unknown node type: %s node: %+v\", reflect.TypeOf(exprNode), exprNode)\n\t}\n}\n\nfunc (impl *interperterImpl) evaluateVariable(variableNode *actionlint.VariableNode) (interface{}, error) {\n\tswitch strings.ToLower(variableNode.Name) {\n\tcase \"github\":\n\t\treturn impl.env.Github, nil\n\tcase \"env\":\n\t\treturn impl.env.Env, nil\n\tcase \"job\":\n\t\treturn impl.env.Job, nil\n\tcase \"jobs\":\n\t\tif impl.env.Jobs == nil {\n\t\t\treturn nil, fmt.Errorf(\"Unavailable context: jobs\")\n\t\t}\n\t\treturn impl.env.Jobs, nil\n\tcase \"steps\":\n\t\treturn impl.env.Steps, nil\n\tcase \"runner\":\n\t\treturn impl.env.Runner, nil\n\tcase \"secrets\":\n\t\treturn impl.env.Secrets, nil\n\tcase \"vars\":\n\t\treturn impl.env.Vars, nil\n\tcase \"strategy\":\n\t\treturn impl.env.Strategy, nil\n\tcase \"matrix\":\n\t\treturn impl.env.Matrix, nil\n\tcase \"needs\":\n\t\treturn impl.env.Needs, nil\n\tcase \"inputs\":\n\t\treturn impl.env.Inputs, nil","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/exprparser/interpreter.go#L145-L181","documentation":"Thrown by evaluateVariable when an identifier is not one of the known contexts (github, env, job, jobs, steps, runner, secrets, vars, strategy, matrix, needs, inputs, infinity, nan). Any other root name in ${{ ... }} is rejected as an unavailable context.","triggerScenarios":"Typos like ${{ enviroment.X }} or ${{ GIT_SHA }}; shell variable usage inside expressions; using contexts only valid elsewhere (e.g. 'job' vs 'jobs' mix-ups); act-specific or newer GitHub contexts not yet implemented.","commonSituations":"Copying shell snippets into if:/run: expressions; expecting plain environment variables to resolve as bare identifiers (they must be env.NAME); version drift where GitHub added a context act lacks.","solutions":["Fix the name to a supported context, prefixing env vars with env. (e.g. ${{ env.GITHUB_SHA }}).","Check the supported list in the interpreter and GitHub docs for the context you intended.","Update act if the context is a newer GitHub addition.","Run actionlint — it validates context names statically."],"exampleFix":"# before\n${{ MY_VAR == 'x' }}\n# after\n${{ env.MY_VAR == 'x' }}","handlingStrategy":"validation","validationCode":"var knownContexts = map[string]bool{'github': true, 'env': true, 'job': true, 'jobs': true, 'steps': true, 'runner': true, 'secrets': true, 'vars': true, 'strategy': true, 'matrix': true, 'needs': true, 'inputs': true}\nfunc rootContextKnown(expr string) bool {\n  m := regexp.MustCompile(`^\\$\\{\\{\\s*([A-Za-z_][A-Za-z0-9_]*)`).FindStringSubmatch(expr)\n  return m != nil && knownContexts[m[1]]\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reference env vars as env.NAME inside expressions","Run actionlint to catch unknown contexts statically","Check the supported context list when a GitHub release adds new ones"],"tags":["expressions","unknown-context","typo","workflow-yaml"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}