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.
The workflow is not valid. .github/workflows/ci.yml (Line: 12, Col: 18):
Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.envCommon 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.
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
- For workflow_call and workflow_dispatch with declared inputs, use the inputs context.
- For values arriving in an event payload, read github.event.inputs or the relevant event field.
- 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.