GitHub Actions composite action inputs not passed
Inside a composite action, declared inputs are available as \${{ inputs.name }}. Referencing them as plain env vars, or forgetting to declare them in action.yml, leaves them empty at runtime.
What this error means
A composite action receives no value for an input, even though the caller passed with: values, because the action referenced it incorrectly.
github-actions
# inputs.token is empty because the step used $TOKEN instead of inputs.token
run: echo "Using $TOKEN"Common causes
Input referenced as env, not inputs context
Composite run steps must use \${{ inputs.name }} to read declared inputs.
Input not declared in action.yml
An input not listed under inputs: is not available to the action.
How to fix it
Declare and reference inputs correctly
- List the input under inputs: in action.yml.
- Reference it as \${{ inputs.name }} in composite run steps.
- Or map it to a step env var explicitly, then read that env var.
action.yml
# action.yml
inputs:
token:
required: true
runs:
using: composite
steps:
- shell: bash
run: echo "Using ${{ inputs.token }}"How to prevent it
- Always reference composite inputs via the inputs context.
- Declare every expected input in action.yml.
Related guides
GitHub Actions reusable workflow secret not inheritedFix a GitHub Actions reusable workflow whose secrets are empty - secrets must be passed explicitly or with se…
GitHub Actions container action requires uses with a Dockerfile/imageFix a GitHub Actions Docker container action that fails because runs.using is docker but no image or Dockerfi…
GitHub Actions uses with both ref and path is invalidFix a GitHub Actions uses value that mixes a local path with a ref - local actions cannot be pinned to a ref.