os/.drone.yml

82 lines
1.9 KiB
YAML
Raw Normal View History

2021-05-29 18:21:58 +00:00
kind: pipeline
type: docker
2021-06-14 23:21:08 +00:00
name: Upstreaming
2021-06-14 22:20:42 +00:00
2021-05-29 18:21:58 +00:00
steps:
- name: "Sync upstream to local"
2021-06-14 22:33:57 +00:00
image: alpine/git
2021-06-14 21:36:03 +00:00
when:
event:
- cron
2021-06-14 21:38:49 +00:00
- promote
target:
- upstream
2021-06-14 23:21:08 +00:00
branch:
- core
2021-05-29 18:21:58 +00:00
environment:
GITEA_SSH_KEY:
from_secret: gitea_ssh_key
commands:
2021-06-14 23:21:08 +00:00
- ./.drone/setup_ssh.sh
2021-06-14 22:56:54 +00:00
- git fetch
2021-06-14 22:41:15 +00:00
- git checkout devos
2021-06-14 22:38:53 +00:00
- git remote add devos git@git.b12f.io:pub-solar/devos
2021-06-14 22:49:52 +00:00
- git remote set-url origin git@git.b12f.io:pub-solar/os
2021-05-29 18:21:58 +00:00
- git fetch --all
- git merge -X theirs devos/core
- git push origin devos
2021-06-14 23:21:08 +00:00
- name: "Sync branch with upstream"
2021-06-14 22:33:57 +00:00
image: alpine/git
when:
status:
- success
2021-06-14 21:36:03 +00:00
event:
- cron
2021-06-14 21:38:49 +00:00
- promote
target:
- upstream
environment:
GITEA_SSH_KEY:
from_secret: gitea_ssh_key
commands:
2021-06-14 23:21:08 +00:00
- ./.drone/setup_ssh.sh
- ./.drone/upstream-branch.sh
- name: "Open pull request for failed merge"
image: nixery.dev/shell/tea
when:
status:
- failure
2021-06-14 21:36:03 +00:00
event:
- cron
2021-06-14 21:38:49 +00:00
- promote
target:
- upstream
2021-06-14 23:21:08 +00:00
branch:
- core
environment:
TEA_CONFIG:
from_secret: tea_config
commands:
- mkdir -p ~/.config/tea
2021-06-14 20:56:15 +00:00
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
- tea pulls create --base core --head devos
2021-06-14 23:21:08 +00:00
- name: "Notify matrix"
image: plugins/matrix
when:
2021-06-14 21:36:03 +00:00
event:
- cron
2021-06-14 21:38:49 +00:00
- promote
target:
- upstream
settings:
2021-06-14 21:31:08 +00:00
homeserver: https://matrix.pub.solar
2021-06-14 21:38:49 +00:00
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
username:
from_secret: matrix_username
password:
from_secret: matrix_password
2021-06-14 23:21:08 +00:00
template: "Upstreaming {{ build.status }} [{{ build.branch }}#{{ truncate build.commit 8 }}]({{ build.link }}) by {{ build.author }}. [Pull requests](https://git.b12f.io/pub-solar/os/pulls)"