WIP: ci: fix 'TYPE' variable usage
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.
This commit is contained in:
parent
3286e92f59
commit
83c66e7d46
|
@ -1,6 +1,3 @@
|
||||||
variables:
|
|
||||||
- &all_events ["push", "cron", "deployment", "manual"]
|
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
backend: local
|
backend: local
|
||||||
|
|
||||||
|
@ -16,24 +13,19 @@ matrix:
|
||||||
# Run the correct matrix build on the correct branch
|
# Run the correct matrix build on the correct branch
|
||||||
when:
|
when:
|
||||||
evaluate: |
|
evaluate: |
|
||||||
CI_PIPELINE_EVENT in ["push", "cron", "deployment", "manual"]
|
(CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) == (TYPE == "prod")
|
||||||
and ((CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) == ("${TYPE}" == "prod"))
|
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
- 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
|
||||||
|
@ -53,8 +45,6 @@ pipeline:
|
||||||
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
|
||||||
|
@ -70,7 +60,6 @@ pipeline:
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue