Skip to content
Latchkey

GitHub Actions "Unable to interpret 'X' as boolean"

Keys such as continue-on-error and a workflow_dispatch boolean input expect a real boolean. An expression that evaluates to an arbitrary string (for example the literal text "true ") fails strict boolean coercion.

What this error means

A boolean-typed key fails with a message naming the offending value, usually after an input or expression produced a quoted or padded string instead of true/false.

github-actions
Error: Unable to interpret 'yes' as a boolean.

Common causes

Expression returns a string, not a boolean

An input default like 'true' is a string; some keys reject it where a literal true is required.

Non-boolean literal supplied

Values like yes/no/1/0 are not booleans to the expression engine.

How to fix it

Produce a real boolean expression

  1. Compare to get a boolean: \${{ inputs.flag == 'true' }}.
  2. Declare workflow_dispatch inputs with type: boolean so they arrive as true/false.
  3. Avoid quoting boolean literals in keys that expect them.
.github/workflows/deploy.yml
on:
  workflow_dispatch:
    inputs:
      deploy:
        type: boolean
        default: false
jobs:
  ship:
    if: ${{ inputs.deploy }}
    runs-on: ubuntu-latest
    steps:
      - run: echo "deploying"

How to prevent it

  • Use type: boolean for dispatch inputs that gate jobs or steps.
  • Coerce strings to booleans with an explicit == comparison.

Frequently asked questions

What causes ""Unable to interpret as boolean""?
An input default like 'true' is a string; some keys reject it where a literal true is required.
How do I fix "Unable to interpret as boolean"?
Produce a real boolean expression

Related guides

References

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