.profile/.woodpecker.yml

35 lines
1 KiB
YAML
Raw Permalink Normal View History

2023-07-26 18:25:22 +02:00
steps:
2023-07-27 13:21:21 +02:00
update_profile:
2023-07-26 18:46:13 +02:00
image: alpine/git
2023-07-26 19:04:08 +02:00
secrets: [ssh_priv_key]
2023-07-26 18:25:22 +02:00
commands:
2023-07-27 13:13:10 +02:00
- git config --global user.email ci@gitnet.fr
- git config --global user.name CI
2023-07-27 13:20:32 +02:00
- apk add wget
2023-07-26 18:41:57 +02:00
- cp README.tpl.md README.md
2023-07-30 13:35:48 +02:00
- ./bin/rss -f https://www.deblan.io/RSS | head -n 10 >> README.md
2023-07-27 13:12:57 +02:00
- git status
2023-07-26 18:46:13 +02:00
- git add .
2023-08-07 16:53:19 +02:00
- git commit -m "Build ${CI_BUILD_NUMBER}" || true
2023-07-27 13:06:20 +02:00
- mkdir -p ~/.ssh
2023-07-26 19:04:57 +02:00
- eval $(ssh-agent -s)
2023-07-26 19:04:08 +02:00
- echo "$SSH_PRIV_KEY" | tr -d '\r' | ssh-add -
2023-07-26 19:08:00 +02:00
- 'echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
2023-07-27 13:07:46 +02:00
- git remote add repo git@gitnet.fr:deblan/.profile.git
2023-08-07 16:54:19 +02:00
- git push repo main || true
2023-07-26 18:46:13 +02:00
when:
2023-07-27 13:21:21 +02:00
event: [deployment, cron]
2023-07-26 18:46:13 +02:00
2023-07-26 19:04:08 +02:00
# deploy:
# image: appleboy/drone-git-push
# commands:
# settings:
# branch: main
# remote: git@gitnet.fr:deblan/.profile.git
# force: false
# commit: false
# ssh_key:
# from_secret: ssh_priv_key
# when:
# event: [push, deployment, cron]