Revert "ci: remove explicit events"

This reverts commit d4bfa1bc74.
This commit is contained in:
Bruno BELANYI 2023-11-18 20:04:36 +00:00
parent f7cb6b0444
commit 458bae5433

View file

@ -1,3 +1,6 @@
variables:
- &all_events ["push", "cron", "deployment", "manual"]
labels: labels:
backend: local backend: local
@ -13,19 +16,24 @@ matrix:
# Run the correct matrix build on the correct branch # Run the correct matrix build on the correct branch
when: when:
evaluate: | 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: steps:
- name: check - name: check
image: bash image: bash
commands: commands:
- nix flake check - nix flake check
when:
event: *all_events
- name: build (${TYPE}) - name: build (${TYPE})
image: bash image: bash
commands: commands:
# If dev, include drafts and future articles, change base URL # If dev, include drafts and future articles, change base URL
- nix develop -c make ${MAKE_TARGET} - nix develop -c make ${MAKE_TARGET}
when:
event: *all_events
- name: deploy (${TYPE}) - name: deploy (${TYPE})
image: bash image: bash
@ -45,6 +53,8 @@ steps:
target: sync_host target: sync_host
commands: commands:
- "nix run github:ambroisie/nix-config#drone-rsync" - "nix run github:ambroisie/nix-config#drone-rsync"
when:
event: *all_events
- name: notify - name: notify
image: bash image: bash
@ -60,6 +70,7 @@ steps:
commands: commands:
- nix run github:ambroisie/matrix-notifier - nix run github:ambroisie/matrix-notifier
when: when:
event: *all_events
status: status:
- failure - failure
- success - success