Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why does 'on' have single quotes in the ci.yml? #441

Unanswered
jonaugustine asked this question in Q&A
Discussion options

Why does 'on' have single quotes in the ci.yml?

You must be logged in to vote

Replies: 1 comment

Comment options

Good question! With YAML, there are a number of boolean aliases besides just true and false, like True/False, Yes/No, and on/off.

So depending on your interpreter, an on could be interpreted as a 1 or boolean True, and GitHub Actions should most definitely only identify it as on meaning "on these specific conditions".

I think it's a little annoying they used a potentially boolean operator for a root level key, but with or without quotes, it should work at least inside GitHub Actions. But I like to write a little closer to spec, and so I specify definitively, to any and all YAML parsers, that on is indeed, a string key ('on'), and not a boolean (which a poorly written parser could justifiably interpret).

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /