morgan.mcmillian.dev/.woodpecker.yml

34 lines
820 B
YAML
Raw Normal View History

2023-03-08 16:44:37 +00:00
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
pipeline:
build:
image: plugins/hugo
2023-03-09 18:34:40 +00:00
settings:
validate: true
2023-03-08 16:44:37 +00:00
publish:
2023-03-09 18:34:40 +00:00
image: alpine:latest
secrets: [ ssh_key ]
environment:
- ANSIBLE_HOST_KEY_CHECKING=False
commands:
2023-03-09 18:43:00 +00:00
- apk add --update ansible rsync openssh
2023-03-09 18:34:40 +00:00
- printf "$SSH_KEY" > privateKey
- chmod 600 privateKey
- ansible-playbook --user igor --inventory hosts.ini --private-key privateKey main.yaml
2023-03-08 16:44:37 +00:00
notify:
image: deblan/woodpecker-email
2023-03-08 16:44:37 +00:00
settings:
2023-08-10 23:49:50 +00:00
from.address: woodpecker@clacks.network
host: smtp.migadu.com
username:
from_secret: smtp_user
2023-03-08 16:44:37 +00:00
password:
from_secret: smtp_pass
2023-08-10 23:49:50 +00:00
evaluate: 'CI_STEP_STATUS == "failure" || CI_PREV_PIPELINE_STATUS == "failure"'