我已经在GitHub Actions上工作了相当长的时间,并且我们有一个指定的工作流程。该工作流程使用yaml编写。
我正在尝试为github.ref
设置一些if
条件,但是这个yaml块在运行时被跳过了。
也就是说 - 如果针对X分支提出了拉取请求 - 那么应该运行该代码块。
类似于这样:
- name: Branch name check - Running only for DEV branch..
if: ${{contains(github.ref, 'DEV*')}}
uses: mathrix-education/sonar-scanner@master
with:
version: 4.2.0.1873 # required
typescript: false
scan: true
有人能帮我解决这个问题吗?
if: ${{contains(github.ref, 'DEV')}}
来仅在分支名称包含DEV
时运行该步骤。 - riQQbranches: - master - UAT - DEV*
在DEV之后的任何内容都应该被捕获。例如:DEV2020。就像这样。 - Rahul Ravikumar*
)? - riQQ