【发布时间】:2020-05-09 11:31:34
【问题描述】:
我只想在代码被推送到特定分支并且标签存在时触发 Github 工作流,但我的配置(github 工作流)没有按预期工作:
name: Deployment
on:
push:
branches:
- feature/BRANCH-NAME
tags:
- *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install dependencies
run: |
npm install
- name: Lint & build
run: |
npm run build
即使标签不存在也会触发工作流。
我该如何解决这个问题?
【问题讨论】:
-
The example in the documentation 说如果你有“分支”和“标签”,那么它会触发它们中的任何一个,即它们是“或”而不是“和”。不知道你是否/如何做'和'。
-
感谢@Rup 的回复。这正是我想以某种方式设置的“和”..
标签: github github-actions