Skip to content
Latchkey

GitHub Actions reusable workflow input type mismatch in CI

Every workflow_call input declares a type: of string, boolean, or number. GitHub validates the caller value against it, so passing a quoted string where a boolean is expected fails.

What this error means

The call fails with a message that the input value does not match its declared type, or a boolean input behaves as always-true because a non-empty string was passed.

GitHub Actions
Invalid workflow file: .github/workflows/ci.yml#L11
The value for input "dry_run" does not match the declared type "boolean".
Provide a boolean expression, not a quoted string.

Common causes

A quoted string passed to a boolean input

Passing dry_run: "false" sends the non-empty string "false", which is truthy. A boolean input needs an unquoted boolean expression.

A non-numeric value for a number input

A type: number input rejects a value that does not parse as a number.

How to fix it

Pass a real boolean, not a quoted string

  1. Use an unquoted true/false or an expression that yields a boolean.
  2. Avoid quoting boolean values in with:.
  3. Re-run so the input matches its declared type.
.github/workflows/ci.yml
with:
  dry_run: ${{ github.ref != 'refs/heads/main' }}

Match number inputs with numeric values

Provide a numeric literal or a numeric expression for a number-typed input.

.github/workflows/deploy.yml
inputs:
  retries:
    type: number
    default: 3

How to prevent it

  • Never quote boolean or number input values in with:.
  • Declare the correct type: on every workflow_call input.
  • Guard boolean inputs with fromJSON only when a string is unavoidable.

Frequently asked questions

What causes "reusable input "does not match" type"?
Passing dry_run: "false" sends the non-empty string "false", which is truthy. A boolean input needs an unquoted boolean expression.
How do I fix reusable input "does not match" type?
Pass a real boolean, not a quoted string

Related guides

References

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