GitHub Actions reusable workflow with no workflow_call trigger in CI
A workflow can only be called by another workflow if it declares on: workflow_call. Without that trigger the file is not a reusable workflow, so the caller cannot invoke it.
What this error means
The caller fails with "was not found" or "does not have the on.workflow_call trigger" even though the path and ref are correct. The called file only lists triggers like push or pull_request.
Invalid workflow file
The workflow "./.github/workflows/deploy.yml" is not a reusable workflow:
it does not define the "workflow_call" trigger.Common causes
The called workflow has no workflow_call trigger
Its on: block only lists push/pull_request/workflow_dispatch, so GitHub treats it as a standalone workflow that cannot be called.
workflow_call is present but under the wrong key
A typo such as workflow-call or nesting it under jobs: instead of top-level on: means the trigger is not recognized.
How to fix it
Add on: workflow_call to the called workflow
- Open the called workflow file.
- Add
workflow_call:under the top-levelon:block. - Declare any
inputs:andsecrets:the caller must pass.
on:
workflow_call:
inputs:
environment:
required: true
type: stringKeep other triggers alongside workflow_call
A workflow can be both callable and self-triggering. List workflow_call next to its other events.
on:
push:
branches: [main]
workflow_call:How to prevent it
- Add workflow_call the moment a workflow is meant to be shared.
- Keep the trigger key spelled exactly workflow_call under top-level on:.
- Document which inputs and secrets a reusable workflow expects.