提交 b6ede127 编写于 作者: J Jason Roehm

add some documentation for `triggers` keyword [ci skip]

上级 6c1badbd
...@@ -286,7 +286,7 @@ There are a few rules that apply to the usage of refs policy: ...@@ -286,7 +286,7 @@ There are a few rules that apply to the usage of refs policy:
* `only` and `except` are inclusive. If both `only` and `except` are defined * `only` and `except` are inclusive. If both `only` and `except` are defined
in a job specification, the ref is filtered by `only` and `except`. in a job specification, the ref is filtered by `only` and `except`.
* `only` and `except` allow the use of regular expressions. * `only` and `except` allow the use of regular expressions.
* `only` and `except` allow the use of special keywords: `branches` and `tags`. * `only` and `except` allow the use of special keywords: `branches`, `tags`, and `triggers`.
* `only` and `except` allow to specify a repository path to filter jobs for * `only` and `except` allow to specify a repository path to filter jobs for
forks. forks.
...@@ -303,6 +303,17 @@ job: ...@@ -303,6 +303,17 @@ job:
- branches - branches
``` ```
In this example, `job` will run only for refs that are tagged, or if a build is explicitly requested
via an API trigger.
```yaml
job:
# use special keywords
only:
- tags
- triggers
```
The repository path can be used to have jobs executed only for the parent The repository path can be used to have jobs executed only for the parent
repository and not forks: repository and not forks:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册