Skip to content
Latchkey

GitHub Actions reusable workflow required input not provided by the caller

A reusable workflow declares inputs under on.workflow_call.inputs. Any input marked required: true must be passed by the caller via with, or the call fails validation before any job runs.

What this error means

Calling the reusable workflow fails immediately with a message that a required input was not provided.

github-actions
Invalid workflow file: required input 'environment' was not provided.
The workflow 'deploy.yml' requires input 'environment' but the caller did not supply it.

Common causes

Caller omitted a required with input

A required input has no default, so the caller must supply it explicitly.

Input name mismatch

A typo in the with key does not match the declared input, so the required input stays unset.

How to fix it

Supply every required input in with

  1. List each required input under with in the calling job.
  2. Match the input names exactly to the callee declaration.
.github/workflows/ci.yml
jobs:
  deploy:
    uses: ./.github/workflows/deploy.yml
    with:
      environment: production

Give the input a default if it is optional

  1. If the input is not truly mandatory, set required: false and add a default in the callee.
  2. This lets callers omit it safely.

How to prevent it

  • Document required inputs and keep caller with keys in sync.
  • Prefer defaults for inputs that have a sensible fallback.

Related guides

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