GitHub Actions reusable workflow output not defined
A reusable workflow only surfaces outputs it explicitly declares under on.workflow_call.outputs, mapped from a job output. If the caller references an output that was not declared, it resolves to empty or errors.
What this error means
The caller gets an empty or undefined value for needs.<job>.outputs.<name> from a reusable workflow.
github-actions
Error: The reusable workflow output 'image_tag' is not defined.
Declare it under on.workflow_call.outputs in the called workflow.Common causes
Output not declared at workflow_call level
The job sets a step/job output but the workflow does not re-export it via on.workflow_call.outputs.
How to fix it
Declare and map the output
- In the called workflow, add on.workflow_call.outputs.<name> mapped from a job output.
- Ensure the job declares that output from a step output.
- Reference it from the caller via the job that called the reusable workflow.
.github/workflows/reusable.yml
on:
workflow_call:
outputs:
image_tag:
value: ${{ jobs.build.outputs.tag }}How to prevent it
- Treat workflow_call.outputs as the public contract of a reusable workflow.
- Keep job outputs and workflow outputs in sync.
Related guides
GitHub Actions Reusable Workflow Outputs Empty in the CallerFix GitHub Actions reusable workflow outputs that arrive empty - workflow_call must declare outputs mapped fr…
GitHub Actions Job Outputs Empty in a Downstream Job (needs.outputs)Fix GitHub Actions job outputs that arrive empty downstream - you must map step outputs to jobs.<id>.outputs…
GitHub Actions needs context outputs are undefinedFix the GitHub Actions error where a downstream job reads needs.<job>.outputs.<name> and gets undefined becau…