GitHub Actions reusable workflow nesting limit exceeded in CI
GitHub limits how deeply reusable workflows can call other reusable workflows. A call chain past the allowed depth is rejected because the nested job exceeds the maximum nesting level.
What this error means
A run fails when a reusable workflow calls another that calls another past the limit, reporting that the nesting level was exceeded.
error parsing called workflow
".github/workflows/c.yml":
job 'deploy' calls a reusable workflow which exceeds the max reusable workflow nesting levelCommon causes
Too many chained workflow_call layers
Workflow A calls B which calls C which calls D, going past the supported nesting depth.
A shared workflow itself calls deeply
A commonly reused workflow already nests internally, so calling it from a deep chain pushes over the limit.
How to fix it
Flatten the call chain
- Map the chain of
uses:reusable-workflow calls. - Collapse intermediate layers so the depth fits within the limit.
- Have the top workflow call leaf workflows directly where possible.
jobs:
build:
uses: ./.github/workflows/build.yml
deploy:
needs: build
uses: ./.github/workflows/deploy.ymlReplace a layer with a composite action
Move shared step logic into a composite action so it does not consume a reusable-workflow nesting level.
How to prevent it
- Keep reusable-workflow chains shallow.
- Prefer composite actions for shared step sequences.
- Document the nesting depth of shared workflows.