[英]Trigger GitHub actions' workflow when some workflows themselves change
Ι want to create a workflow that is triggered when some other .github/workflow
files change. Ι 想要创建一个在其他一些
.github/workflow
文件更改时触发的工作流。
I want to monitor all the .github/workflow
starting with a specific prefix.我想监视以特定前缀开头的所有
.github/workflow
。 ie foo_
, as in .github/workflow/foo_1.yaml
, .github/workflow/foo_2.yaml
etc.即
foo_
,如.github/workflow/foo_1.yaml
、 .github/workflow/foo_2.yaml
等。
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).请注意,如果在工作流中配置了另一个触发事件,它可以从由一个OR另一个(不是 AND)触发开始。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.