Ι want to create a workflow that is triggered when some other .github/workflow
files change.
I want to monitor all the .github/workflow
starting with a specific prefix. ie foo_
, as in .github/workflow/foo_1.yaml
, .github/workflow/foo_2.yaml
etc.
Is it possible to specify such a pattern on the workflow trigger?
Yes, you can do it natively using the push event trigger, with the paths subtype.
Example:
on:
push:
paths:
- '.github/workflows/foo_**'
Note that if there is another trigger event configured in the workflow, it can start by being triggering by one OR the other (not AND).
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.