FG
☁️ Cloud & DevOpsMicrosoft

Boolean inputs are not actually booleans

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score78%
78%

Problem

>[!NOTE] > Although this has been fixed, see also: > - #2238 Describe the bug Boolean type inputs do not work as expected; they are strings instead of booleans, even when surrounded by `${{ }}` (e.g. in a step's `if` condition). To Reproduce Steps to reproduce the behavior: Run this workflow using the workflow dispatch, with the foo input checkbox not ticked: [code block] Expected behavior When the input is `false`, the `Run if foo` step should be skipped , and the `Don't run if foo` step should run. Runner Version and Platform Version of your runner? `2.284.0` OS of the machine running the runner? `ubuntu-latest (20.04.3)` What's not working? The value of `github.event.inputs.foo` is `false`, yet the `Run if foo` step runs and the `Don't run if foo` step is skipped. Additional context It is the same for a string input type or boolean input type (https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows/). Only `if: ${{ github.event.inputs.foo == 'true' }}` works. So the input must be being treated as a string. This goes against what the documentation says at https://docs.github.com/en/actions/learn-github-actions/expressions#about-expressions: >...evaluate an expression rather than treat it as a string. > >`${{ <expression> }}`

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: Boolean inputs are not actually booleans

Low Risk

I guess this is a github service bug, sadly broken by design :(. the value of the workflow_dispatch payload is `'false'`, but both of us are expecting a boolean `false` and not a string. Why does this happen? `'false'` is a non empty string, which is truthy. [code block] However this might align to previous `workflow_dispatch` behavior, all inputs are strings like before. This is super inconsist

74

Trust Score

6 verifications

100% success
  1. 1

    I guess this is a github service bug, sadly broken by design :(.

    I guess this is a github service bug, sadly broken by design :(.

  2. 2

    the value of the workflow_dispatch payload is `'false'`, but both of us are expe

    Why does this happen? `'false'` is a non empty string, which is truthy. [code block] However this might align to previous `workflow_dispatch` behavior, all inputs are strings like before.

  3. 3

    This is super inconsistent with reusable workflows `workflow_call` ( beta ), bec

    [code block] [code block]

Validation

Resolved in actions/runner GitHub issue #1483. Community reactions: 21 upvotes.

Verification Summary

Worked: 6
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

github-actionsci-cdrunnerservice-bug