From 458bae5433bfb2f1c6479eba9f602fb03d76bf3c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 18 Nov 2023 20:04:36 +0000 Subject: [PATCH] Revert "ci: remove explicit events" This reverts commit d4bfa1bc740ff4304a0a7352afcf8c8b517d3104. --- .woodpecker/deploy.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index c646113..b876157 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -1,3 +1,6 @@ +variables: +- &all_events ["push", "cron", "deployment", "manual"] + labels: backend: local @@ -13,19 +16,24 @@ matrix: # Run the correct matrix build on the correct branch when: evaluate: | - ((CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) == ("${TYPE}" == "prod")) + CI_PIPELINE_EVENT in ["push", "cron", "deployment", "manual"] + and ((CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) == ("${TYPE}" == "prod")) steps: - name: check image: bash commands: - nix flake check + when: + event: *all_events - name: build (${TYPE}) image: bash commands: # If dev, include drafts and future articles, change base URL - nix develop -c make ${MAKE_TARGET} + when: + event: *all_events - name: deploy (${TYPE}) image: bash @@ -45,6 +53,8 @@ steps: target: sync_host commands: - "nix run github:ambroisie/nix-config#drone-rsync" + when: + event: *all_events - name: notify image: bash @@ -60,6 +70,7 @@ steps: commands: - nix run github:ambroisie/matrix-notifier when: + event: *all_events status: - failure - success