From efde4a58c22b175592660c12783eaf019584c426 Mon Sep 17 00:00:00 2001 From: Sergio Fenoll Date: Mon, 11 Dec 2023 11:02:32 +0100 Subject: [PATCH] chore: set pipeline event conditions at root level By moving the conditions to the root level, we ensure that the pipelines are only ran when the applicable conditions are met. The current setup will run three pipelines no matter what (and clone the repo thrice), but possibly do nothing afterwards. With the new setup we will e.g. not run the feature-pipeline when pushing a tag. --- .woodpecker/.feature.yml | 6 +++--- .woodpecker/.latest.yml | 6 +++--- .woodpecker/.release.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.woodpecker/.feature.yml b/.woodpecker/.feature.yml index eb51d40..6638142 100644 --- a/.woodpecker/.feature.yml +++ b/.woodpecker/.feature.yml @@ -5,6 +5,6 @@ pipeline: repo: "${CI_REPO_OWNER##mu-}/${CI_REPO_NAME}" tags: "feature-${CI_COMMIT_BRANCH##feature/}" secrets: [docker_username, docker_password] - when: - event: push - branch: feature/* +when: + event: push + branch: feature/* diff --git a/.woodpecker/.latest.yml b/.woodpecker/.latest.yml index 53b9f7c..0f47e36 100644 --- a/.woodpecker/.latest.yml +++ b/.woodpecker/.latest.yml @@ -5,6 +5,6 @@ pipeline: repo: "${CI_REPO_OWNER##mu-}/${CI_REPO_NAME}" tags: latest secrets: [docker_username, docker_password] - when: - event: push - branch: [master, main] +when: + event: push + branch: [master, main] diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml index ecf8ee3..c0a4030 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.release.yml @@ -5,6 +5,6 @@ pipeline: repo: "${CI_REPO_OWNER##mu-}/${CI_REPO_NAME}" tags: "${CI_COMMIT_TAG##v}" secrets: [ docker_username, docker_password ] - when: - event: tag - tag: v* +when: + event: tag + tag: v*