在任何推送或拉取请求上运行GitHub Action 非常容易:
# Triggers the workflow on push or pull request events
on: [push, pull_request]
但是,如果我想将运行限制为针对特定基础参照打开的拉取请求,同时允许在所有分支上运行怎么办?
我考虑了一下:
on:
push:
branches:
- "*"
pull_request:
branches:
- "develop"
- "staging"
但是它没有起作用。我将此操作添加到一个特性分支中,但 GitHub 没有捕获到它。
我的全局通配符有什么问题吗? 为什么“*”不起作用?
branches
对象,以便触发任何分支的事件。 - Benjamin W.on: {}
。 - MEMarkbranches: []
- theartofrain