{"record":{"id":"c80734159d298748","repo":"nektos/act","slug":"missing-steps-in-composite-action","errorCode":null,"errorMessage":"missing steps in composite action","messagePattern":"missing steps in composite action","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/action.go","lineNumber":580,"sourceCode":"\n\t\t\treturn rc.execJobContainer(containerArgs, *step.getEnv(), \"\", \"\")(ctx)\n\n\t\tcase x.IsDocker():\n\t\t\tif remoteAction == nil {\n\t\t\t\tactionDir = \"\"\n\t\t\t\tactionPath = containerActionDir\n\t\t\t}\n\t\t\treturn execAsDocker(ctx, step, actionName, actionDir, actionPath, remoteAction == nil, \"pre-entrypoint\")\n\n\t\tcase x.IsComposite():\n\t\t\tif step.getCompositeSteps() == nil {\n\t\t\t\tstep.getCompositeRunContext(ctx)\n\t\t\t}\n\n\t\t\tif steps := step.getCompositeSteps(); steps != nil && steps.pre != nil {\n\t\t\t\treturn steps.pre(ctx)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"missing steps in composite action\")\n\n\t\tdefault:\n\t\t\treturn nil\n\t\t}\n\t}\n}\n\nfunc shouldRunPostStep(step actionStep) common.Conditional {\n\treturn func(ctx context.Context) bool {\n\t\tlog := common.Logger(ctx)\n\t\tstepResults := step.getRunContext().getStepsContext()\n\t\tstepResult := stepResults[step.getStepModel().ID]\n\n\t\tif stepResult == nil {\n\t\t\tlog.WithField(\"stepResult\", model.StepStatusSkipped).Debugf(\"skipping post step for '%s'; step was not executed\", step.getStepModel())\n\t\t\treturn false\n\t\t}\n","sourceCodeStart":562,"sourceCodeEnd":598,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/runner/action.go#L562-L598","documentation":"Thrown in the pre stage of a composite action step (pkg/runner/action.go). Before running, act lazily builds the composite RunContext via step.getCompositeRunContext(ctx) and then expects getCompositeSteps() to yield a populated steps struct with a non-nil pre executor. If steps is nil (run context construction failed silently, e.g. action metadata could not be read) or steps.pre is nil (the composite action's action.yml defines no 'pre' step is acceptable — pre is then simply skipped), the nil-steps case is reported as 'missing steps in composite action'.","triggerScenarios":"A 'uses: local/remote-composite-action' step whose action.yml is missing, malformed, unreadable, or contains no 'runs.steps' section; step.getCompositeRunContext succeeds but populate-step recursion (which calls newCompositeRunContext and builds steps) leaves getCompositeSteps() nil.","commonSituations":"Composite action metadata (action.yml/action.yaml) not committed, wrong path for a local action, remote composite action cloned to an empty dir, or an action.yml whose 'runs' block uses 'using: composite' but omits 'steps'.","solutions":["Check the referenced action's action.yml exists and has 'runs: using: composite' with a non-empty 'runs.steps' list.","For local actions, verify the 'uses:' path points at the directory containing action.yml (relative to the repo root, e.g. uses: ./.github/actions/my-action).","For remote actions, verify the ref exists and the repo root actually contains action.yml; clear the action cache (~/.cache/act) in case of a corrupt clone.","Validate the YAML parses (e.g. 'python -c \"import yaml,sys;yaml.safe_load(open('action.yml'))\"' or yamllint) — a YAML syntax error can leave steps unset."],"exampleFix":"# before (action.yml)\nruns:\n  using: composite\n# no steps key\n\n# after\nruns:\n  using: composite\n  steps:\n    - run: echo hello\n      shell: bash","handlingStrategy":"validation","validationCode":"# before running act, assert the composite action metadata exists and has steps\nACTION_DIR=.github/actions/my-action\n[ -f \"$ACTION_DIR/action.yml\" ] || { echo \"missing $ACTION_DIR/action.yml\"; exit 1; }\ngrep -q 'using: composite' \"$ACTION_DIR/action.yml\" && grep -qE '^\\s+steps:' \"$ACTION_DIR/action.yml\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Lint actions with actionlint before committing.","Always include a non-empty runs.steps in composite action.yml.","Point uses: at the directory containing action.yml."],"tags":["composite-action","action-yml","act","workflow"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}