Skip to content
Latchkey

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

  1. In the called workflow, add on.workflow_call.outputs.<name> mapped from a job output.
  2. Ensure the job declares that output from a step output.
  3. 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →