GitHub Actions "Recursive workflow call detected"
Reusable workflows cannot form a call cycle. If a chain of workflow_call uses eventually re-invokes one already in the chain, GitHub detects the recursion and refuses to run it.
What this error means
A run with nested reusable-workflow calls fails with "Recursive workflow call detected", naming the workflow that re-enters the chain.
Error: Recursive workflow call detected: org/repo/.github/workflows/deploy.yml@mainCommon causes
Direct self-call
A reusable workflow uses itself, immediately forming a one-node cycle.
Indirect cycle through a chain
A calls B calls C calls A, so the call graph loops back on itself.
How to fix it
Break the recursive call chain
- Trace the workflow_call chain and find where it loops.
- Remove or restructure the call that re-enters an earlier workflow.
- Extract shared logic into a leaf workflow that calls nothing.
# leaf workflow has on: workflow_call and calls no other reusable workflow
on: workflow_call
jobs:
build:
runs-on: ubuntu-latest
steps: [{ run: make }]How to prevent it
- Keep the reusable-workflow call graph acyclic.
- Push shared steps into leaf workflows that call nothing.
- Review nested workflow_call chains for loops.