ci: add Woodpecker CI workflow
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
This commit is contained in:
parent
f16929c288
commit
58ea2f8276
47
.woodpecker/deploy.yml
Normal file
47
.woodpecker/deploy.yml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
labels:
|
||||||
|
type: exec
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- TYPE: dev
|
||||||
|
MAKE_TARGET: build-dev
|
||||||
|
SSH_TARGET: ssh_target_dev
|
||||||
|
- TYPE: prod
|
||||||
|
MAKE_TARGET: build-prod
|
||||||
|
SSH_TARGET: ssh_target
|
||||||
|
|
||||||
|
# Run the correct matrix build on the correct branch
|
||||||
|
when:
|
||||||
|
evaluate: |
|
||||||
|
CI_PIPELINE_EVENT in ["push", "cron", "deployment", "manual"]
|
||||||
|
and ((CI_COMMIT_BRANCH == "main") == ("${TYPE}" == "prod"))
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
- name: check
|
||||||
|
image: bash
|
||||||
|
commands:
|
||||||
|
- nix flake check
|
||||||
|
|
||||||
|
- name: build (${TYPE})
|
||||||
|
image: bash
|
||||||
|
commands:
|
||||||
|
# If dev, include drafts and future articles, change base URL
|
||||||
|
- nix develop -c make ${MAKE_TARGET}
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: bash
|
||||||
|
secrets:
|
||||||
|
- source: matrix_homeserver
|
||||||
|
target: address
|
||||||
|
- source: matrix_password
|
||||||
|
target: pass
|
||||||
|
- source: matrix_roomid
|
||||||
|
target: room
|
||||||
|
- source: matrix_username
|
||||||
|
target: user
|
||||||
|
commands:
|
||||||
|
- nix run github:ambroisie/matrix-notifier
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- success
|
Loading…
Reference in a new issue