mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-06 08:16:19 +02:00
parent
f654e1f316
commit
c3eed4ec01
@ -332,12 +332,12 @@ when:
|
||||
event: tag
|
||||
```
|
||||
|
||||
Execute a step if the build event is a `tag` created from the specified branch:
|
||||
Execute a step if the pipeline event is a `push` to a specified branch:
|
||||
|
||||
```diff
|
||||
when:
|
||||
event: tag
|
||||
+ branch: master
|
||||
event: push
|
||||
+ branch: main
|
||||
```
|
||||
|
||||
Execute a step for all non-pull request events:
|
||||
|
@ -9,10 +9,10 @@ To convert this:
|
||||
pipeline:
|
||||
test:
|
||||
image: golang:1.18
|
||||
command: go test ./...
|
||||
commands: go test ./...
|
||||
build:
|
||||
image: golang:1.18
|
||||
command: build
|
||||
commands: build
|
||||
```
|
||||
|
||||
Just add a new section called **variables** like this:
|
||||
@ -25,11 +25,11 @@ Just add a new section called **variables** like this:
|
||||
test:
|
||||
- image: golang:1.18
|
||||
+ image: *golang_image
|
||||
command: go test ./...
|
||||
commands: go test ./...
|
||||
build:
|
||||
- image: golang:1.18
|
||||
+ image: *golang_image
|
||||
command: build
|
||||
commands: build
|
||||
```
|
||||
|
||||
## Example of YAML override and extension
|
||||
|
Loading…
Reference in New Issue
Block a user