Skip to content
Latchkey

GitHub Actions "inputs" not available in job-level if before uses in CI

The inputs context belongs to the called workflow, not the caller. A calling job's if: runs in the caller, so ${{ inputs.x }} there is undefined unless the caller itself was triggered by workflow_call or workflow_dispatch with those inputs.

What this error means

A job-level if: on a calling job fails to parse with "Unrecognized named-value: 'inputs'", or silently evaluates to false because inputs is empty in the caller.

GitHub Actions
Invalid workflow file: .github/workflows/ci.yml#L11
Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.deploy
The inputs context is not available in the caller's job-level "if".

Common causes

Reading callee inputs from the caller

You guarded the calling job with if: inputs.deploy == true, but those inputs exist inside the reusable workflow, not in the caller that invokes it.

The caller has no matching inputs context

Unless the caller is itself triggered by workflow_call or workflow_dispatch that defines deploy, the caller's inputs context is empty.

How to fix it

Guard the call with caller-side context

  1. Use github, vars, or an upstream needs.*.outputs value in the calling job if.
  2. Pass the decision into the reusable workflow as an input.
  3. Move any inputs-based condition inside the called workflow jobs.
.github/workflows/ci.yml
jobs:
  deploy:
    if: github.ref == 'refs/heads/main'
    uses: ./.github/workflows/deploy.yml
    with:
      run_deploy: true

Condition inside the reusable workflow

Let the called workflow decide with its own inputs context on its jobs or steps.

.github/workflows/deploy.yml
# in deploy.yml
jobs:
  run:
    if: ${{ inputs.run_deploy }}
    runs-on: ubuntu-latest

How to prevent it

  • Remember inputs belongs to the callee, not the calling job.
  • Guard calling jobs with github, vars, or needs outputs.
  • Put inputs-based conditions inside the reusable workflow.

Frequently asked questions

What causes ""Unrecognized named-value: inputs""?
You guarded the calling job with if: inputs.deploy == true, but those inputs exist inside the reusable workflow, not in the caller that invokes it.
How do I fix "Unrecognized named-value: inputs"?
Guard the call with caller-side context

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card