From 7968bbc6ec12ab0a39bc5bf1ff6a55b3c62aaf18 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 25 Jul 2023 23:43:19 +0200 Subject: [PATCH] fix ci workflow conditions --- .woodpecker/container.yml | 26 ++++++++++++++++++-------- .woodpecker/notify.yml | 7 +++++-- .woodpecker/release.yml | 12 ++++++++---- .woodpecker/test.yml | 9 ++++++--- 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/.woodpecker/container.yml b/.woodpecker/container.yml index beb8c53..838ccf8 100644 --- a/.woodpecker/container.yml +++ b/.woodpecker/container.yml @@ -1,8 +1,11 @@ --- when: - - ref: refs/heads/main - - ref: refs/tags/** - - ref: refs/pull/** + - event: + - pull_request + - tag + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} steps: dryrun: @@ -18,7 +21,8 @@ steps: provenance: false repo: thegeeklab/${CI_REPO_NAME} when: - - ref: refs/pull/** + - event: + - pull_request publish-dockerhub: group: build @@ -38,8 +42,11 @@ steps: username: from_secret: docker_username when: - - ref: refs/heads/main - - ref: refs/tags/** + - event: + - tag + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} publish-quay: group: build @@ -60,8 +67,11 @@ steps: username: from_secret: quay_username when: - - ref: refs/heads/main - - ref: refs/tags/** + - event: + - tag + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} depends_on: - test diff --git a/.woodpecker/notify.yml b/.woodpecker/notify.yml index bf07a8b..5f2fa07 100644 --- a/.woodpecker/notify.yml +++ b/.woodpecker/notify.yml @@ -1,7 +1,10 @@ --- when: - - ref: refs/heads/main - - ref: refs/tags/** + - event: + - tag + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} runs_on: - success - failure diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml index 0496113..a470152 100644 --- a/.woodpecker/release.yml +++ b/.woodpecker/release.yml @@ -1,8 +1,11 @@ --- when: - - ref: refs/heads/main - - ref: refs/tags/** - - ref: refs/pull/** + - event: + - pull_request + - tag + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} steps: checksum: @@ -34,7 +37,8 @@ steps: overwrite: true title: ${CI_COMMIT_TAG} when: - - ref: refs/tags/** + - event: + - tag depends_on: - test diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index 6830b77..ab38d75 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -1,8 +1,11 @@ --- when: - - ref: refs/heads/main - - ref: refs/tags/** - - ref: refs/pull/** + - event: + - pull_request + - tag + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} steps: lint: