简体   繁体   中英

GitHub Actions workflow syntax not working as expected

I have a GitHub workflow that is triggered when files according to the pattern **/abc** are modified / created. As far as I understand it, this means that whenever a:

  1. File that is in some subfolder of a folder that starts with abc or
  2. Any file that starts with abc

is modified, the GH action should be triggered. However, the workflow is even triggered when I eg create a file repository/aaa/test_abc

However, to my understanding, the file repository/aaa/test_abc does not correspond to the pattern **/abc**

Do I

  1. Misunderstand GH actions syntax or is it
  2. A Bug in GH actions?

You need to escape the / with a \ for the pattern to work.

Using '**\/abc**' will resolve the problem.

Most of the time, the filter pattern cheat sheet for the Github Documentation helps to configure the paths, but in that specific case it wasn't detailed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM