docs icon indicating copy to clipboard operation
docs copied to clipboard

Note on the use of square brackets in GitHub Actions workflows filter patterns

Open noritada opened this issue 3 years ago • 1 comments

Code of Conduct

What article on docs.github.com is affected?

Following paragraphs:

on.<pull_request|pull_request_target>.<branches|branches-ignore>

The branches and branches-ignore keywords accept glob patterns that use characters like *, **, +, ?, ! and others to match more than one branch name. If a name contains any of these characters and you want a literal match, you need to escape each of these special characters with . For more information about glob patterns, see the "Filter pattern cheat sheet."

Filter pattern cheat sheet

The characters *, [, and ! are special characters in YAML. If you start a pattern with *, [, or !, you must enclose the pattern in quotes.

What part(s) of the article would you like to see updated?

As in the case with three special characters at the beginning of a pattern, if you use [ and/or ] in a flow sequence, you must enclose them in quotes. Since there must be quite a few people who make such a statement, I think it would be a good idea to write a warning.

ss 2022-07-10 23 08 52

Additional information

No response

noritada avatar Jul 10 '22 15:07 noritada

All parts that will be more understandable easily and quickly

Benson665 avatar Jul 13 '22 00:07 Benson665