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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -332,12 +332,12 @@ when:
event: tag 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 ```diff
when: when:
event: tag event: push
+ branch: master + branch: main
``` ```
Execute a step for all non-pull request events: Execute a step for all non-pull request events:

View file

@ -9,10 +9,10 @@ To convert this:
pipeline: pipeline:
test: test:
image: golang:1.18 image: golang:1.18
command: go test ./... commands: go test ./...
build: build:
image: golang:1.18 image: golang:1.18
command: build commands: build
``` ```
Just add a new section called **variables** like this: Just add a new section called **variables** like this:
@ -25,11 +25,11 @@ Just add a new section called **variables** like this:
test: test:
- image: golang:1.18 - image: golang:1.18
+ image: *golang_image + image: *golang_image
command: go test ./... commands: go test ./...
build: build:
- image: golang:1.18 - image: golang:1.18
+ image: *golang_image + image: *golang_image
command: build commands: build
``` ```
## Example of YAML override and extension ## Example of YAML override and extension