More when filters (#3407)

to not run empty pipelines
This commit is contained in:
qwerty287 2024-02-23 06:05:25 +01:00 committed by GitHub
parent de5c65939a
commit 901315625b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 24 deletions

View file

@ -1,11 +1,3 @@
when:
- event: [pull_request, tag]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
variables:
- &golang_image 'docker.io/golang:1.22.0'
- &node_image 'docker.io/node:21-alpine'
@ -46,6 +38,15 @@ variables:
# pipeline config changes
- '.woodpecker/docker.yaml'
when:
- event: [pull_request, tag]
- event: push
branch:
- renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
path: *when_path
steps:
vendor:
image: *golang_image
@ -59,7 +60,6 @@ steps:
path: *when_path
- branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
event: [push, tag]
path: *when_path
@ -81,7 +81,6 @@ steps:
path: *when_path
- branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
event: [push, tag]
path: *when_path
@ -107,9 +106,7 @@ steps:
path: *when_path
- event: push
path: *when_path
branch:
- release/*
- renovate/*
branch: renovate/*
cross-compile-server:
depends_on:
@ -175,9 +172,7 @@ steps:
path: *when_path
- event: push
path: *when_path
branch:
- release/*
- renovate/*
branch: renovate/*
publish-next-server:
depends_on:

View file

@ -1,10 +1,3 @@
when:
- event: pull_request
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- renovate/*
variables:
- &golang_image 'docker.io/golang:1.21.5'
- &when
@ -21,6 +14,14 @@ variables:
branch: renovate/*
path: *when_path
when:
- event: pull_request
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
path: *when_path
steps:
vendor:
image: *golang_image

View file

@ -2,7 +2,6 @@ when:
- event: pull_request
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*