{"record":{"id":"54737e9d25a1824e","repo":"nektos/act","slug":"unable-to-determine-how-to-run-job-s-step-v","errorCode":null,"errorMessage":"Unable to determine how to run job:%s step:%+v","messagePattern":"Unable to determine how to run job:(.+?) step:%\\+v","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/step_factory.go","lineNumber":45,"sourceCode":"\t\t\tRunContext: rc,\n\t\t\treadAction: readActionImpl,\n\t\t\trunAction:  runActionImpl,\n\t\t}, nil\n\tcase model.StepTypeUsesActionRemote:\n\t\treturn &stepActionRemote{\n\t\t\tStep:       stepModel,\n\t\t\tRunContext: rc,\n\t\t\treadAction: readActionImpl,\n\t\t\trunAction:  runActionImpl,\n\t\t}, nil\n\tcase model.StepTypeUsesDockerURL:\n\t\treturn &stepDocker{\n\t\t\tStep:       stepModel,\n\t\t\tRunContext: rc,\n\t\t}, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"Unable to determine how to run job:%s step:%+v\", rc.Run, stepModel)\n}\n","sourceCodeStart":27,"sourceCodeEnd":47,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/runner/step_factory.go#L27-L47","documentation":"Thrown by stepFactoryImpl.newStep when model.Step.Type() returns a value not covered by the switch in pkg/runner/step_factory.go:16-43. The factory maps each step type (run, uses-action-local, uses-action-remote, uses-docker-url) to a step implementation; this error is the defensive default branch meaning the Step model produced a type the factory cannot execute.","triggerScenarios":"A workflow step whose YAML produces a model.Step with a Type() value outside the five handled cases. In practice unreachable with the stock model package (StepTypeInvalid is handled at line 17); fires in forks or version-skewed builds where a new model.StepType constant exists but step_factory.go was not updated, or a corrupted/unparseable `uses:`/`run:` combination falls through.","commonSituations":"Mixing act packages of different versions (pkg/model newer than pkg/runner), vendoring a modified model package that adds step types, or a malformed step that dodges both the Invalid and known-type paths.","solutions":["Check the printed step (%+v) and job name to identify which YAML step produced the unknown type","Verify the step uses either `run:` or `uses: <action|docker://...>` with valid syntax","If running a fork or modified build, update step_factory.go's switch to handle the new model.StepType value","Ensure pkg/model and pkg/runner come from the same act release (go mod tidy / matching version)"],"exampleFix":"# workflow yaml - keep steps to known forms\n# before (ambiguous/none):\n- name: weird\n# after:\n- name: run something\n  run: echo hi\n# or\n- name: docker step\n  uses: docker://alpine:3.19\n  with:\n    entrypoint: echo\n    args: hi","handlingStrategy":"validation","validationCode":"// Before building execution, ensure every step has a known shape:\nfor _, s := range job.Steps {\n    switch s.Type() {\n    case model.StepTypeRun, model.StepTypeUsesActionLocal,\n        model.StepTypeUsesActionRemote, model.StepTypeUsesDockerURL:\n        // ok\n    default:\n        return fmt.Errorf(\"step %q has unsupported type\", s.ID)\n    }\n}","typeGuard":null,"tryCatchPattern":"Catch the error from newStep and report job+step identifiers verbatim; do not retry — this is a deterministic configuration failure.","preventionTips":["Keep pkg/model and pkg/runner from the same act release","In forks, update step_factory.go whenever adding a model.StepType constant","Lint workflow YAML with actionlint before running act"],"tags":["go","act","step-factory","workflow-validation","defensive-code"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}