yamllint "truthy value should be one of [false, true]" in CI
yamllint's truthy rule wants booleans written canonically as true or false. Legacy YAML booleans (yes, no, on, off, True) trigger "truthy value should be one of [false, true]".
What this error means
yamllint reports "truthy value should be one of [false, true] (truthy)" on a value like yes, on, or a capitalized True. This also warns about the GitHub Actions on: key.
workflow.yml
1:1 warning truthy value should be one of [false, true] (truthy)
9:14 error truthy value should be one of [false, true] (truthy)Common causes
A non-canonical boolean literal
YAML 1.1 treats yes/no/on/off as booleans; the truthy rule wants them normalized to true/false.
The GitHub Actions "on:" key looks truthy
The reserved on: trigger key is read as the boolean on, so the rule flags line 1 of every workflow unless configured.
How to fix it
Use canonical booleans
- Replace
yes/no/on/off/Truewithtrueorfalse. - Quote intentional string values like
"on"if they must stay strings. - Re-run
yamllintto confirm.
# wrong
enabled: yes
# right
enabled: trueAllow the Actions "on" key in config
Add on to check-keys exclusions (or set allowed-values) so workflow trigger keys do not warn.
rules:
truthy:
allowed-values: ['true', 'false']
check-keys: falseHow to prevent it
- Standardize on
true/falseeverywhere in YAML. - Configure the truthy rule to ignore the Actions
on:key. - Quote strings that happen to spell booleans.