Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
6543
2022-07-18 23:08:13 +02:00
committed by GitHub
parent f654e1f316
commit c3eed4ec01
2 changed files with 7 additions and 7 deletions

View File

@@ -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:

View File

@@ -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