简体   繁体   English

当某些工作流本身发生变化时触发 GitHub 操作的工作流

[英]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.

相关问题 github 操作 - 仅当 .github/workflows/ 中的文件发生更改时才触发工作流 - github action - trigger the workflow only when there is a change in files in .github/workflows/ 如何将 GitHub Actions 工作流程验证为 GitHub 应用程序,以便它可以触发其他工作流程? - How to authenticate a GitHub Actions workflow as a GitHub App so it can trigger other workflows? 如何基于多个工作流触发GitHub Action工作流 - How to trigger GitHub Action workflow based on several workflows 推送 Github 操作后,还有其他触发工作流的方法吗? - Any other way to trigger workflows after pushing in Github Actions? Github 操作 - 取消/手动触发工作流程 - Github actions - cancel/manually trigger workflow GitHub 发布操作创建的工作流触发器不起作用 - GitHub Actions on release created workflow trigger not working 在另一个工作流成功运行后手动触发 Github Actions 工作流 - Manually trigger Github Actions workflow after another workflow successfully runs 在 Github 操作/工作流中使用 ddev - using ddev in Github actions/workflows 在存储库中未检测到 GitHub 操作工作流 - No GitHub Actions workflows detected in repository Github 操作上的工作流之间的依赖关系 - Dependencies Between Workflows on Github Actions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM