Skip to content
Latchkey

GitHub Actions "Unrecognized named-value: inputs" - Context Scope

An expression references the inputs context, but this workflow never declared any inputs under workflow_call or workflow_dispatch, so the parser does not recognize the name.

What this error means

The workflow fails to compile with "Unrecognized named-value: inputs", even though the same expression works in another workflow. The file is valid YAML but the inputs context does not exist here.

Actions annotation
The workflow is not valid. .github/workflows/ci.yml (Line: 12, Col: 18):
Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.env

Common causes

No inputs declared for this trigger

The inputs context only exists when the workflow defines inputs under on.workflow_call or on.workflow_dispatch. Referencing inputs.x without that declaration is an unknown named-value.

Confusing inputs with github.event.inputs

For a manual run triggered by another event, payload values live under github.event.inputs, not the inputs context. The two are populated by different mechanisms.

How to fix it

Declare the inputs you reference

Add the input under the trigger that runs this workflow so the inputs context is populated.

.github/workflows/ci.yml
on:
  workflow_dispatch:
    inputs:
      env:
        type: string
        default: staging
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Deploying to ${{ inputs.env }}"

Use the right source for the value

  1. For workflow_call and workflow_dispatch with declared inputs, use the inputs context.
  2. For values arriving in an event payload, read github.event.inputs or the relevant event field.
  3. Run actionlint, which knows which contexts are valid for each trigger.

How to prevent it

  • Declare every input under the trigger before referencing it.
  • Prefer the inputs context over github.event.inputs for dispatch and call inputs.
  • Validate expressions with actionlint, not just generic YAML.

Frequently asked questions

What causes ""named-value: inputs""?
The inputs context only exists when the workflow defines inputs under on.workflow_call or on.workflow_dispatch. Referencing inputs.x without that declaration is an unknown named-value.
How do I fix "named-value: inputs"?
Add the input under the trigger that runs this workflow so the inputs context is populated.

Related guides

References

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