Compare commits

...

1 Commits
main ... test

Author SHA1 Message Date
Bruno BELANYI 83c66e7d46 WIP: ci: fix 'TYPE' variable usage
ci/woodpecker/push/deploy Pipeline was successful Details
ci/woodpecker/manual/deploy Pipeline was successful Details
I *think* this way should have worked, but it doesn't [1].

So let's use an actual variable instead of interpolation, which *should*
work.
2023-11-01 19:15:25 +01:00
1 changed files with 1 additions and 12 deletions

View File

@ -1,6 +1,3 @@
variables:
- &all_events ["push", "cron", "deployment", "manual"]
labels:
backend: local
@ -16,24 +13,19 @@ matrix:
# Run the correct matrix build on the correct branch
when:
evaluate: |
CI_PIPELINE_EVENT in ["push", "cron", "deployment", "manual"]
and ((CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) == ("${TYPE}" == "prod"))
(CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) == (TYPE == "prod")
pipeline:
- 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
@ -53,8 +45,6 @@ pipeline:
target: sync_host
commands:
- "nix run github:ambroisie/nix-config#drone-rsync"
when:
event: *all_events
- name: notify
image: bash
@ -70,7 +60,6 @@ pipeline:
commands:
- nix run github:ambroisie/matrix-notifier
when:
event: *all_events
status:
- failure
- success