forked from pub-solar/os
Drone: follow new upstream default branch main, cron fixes (#30)
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/30 Co-authored-by: teutat3s <teutates@mailbox.org> Co-committed-by: teutat3s <teutates@mailbox.org>
This commit is contained in:
parent
9d0e9efb47
commit
0f4f8eca37
45
.drone.yml
45
.drone.yml
|
@ -4,24 +4,39 @@ type: docker
|
||||||
name: Upstreaming
|
name: Upstreaming
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Sync 'devos' branch with upstream"
|
- name: "Setup git repos and SSH access"
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- cron
|
- cron
|
||||||
cron:
|
cron:
|
||||||
- sync-master-with-upstream
|
- sync-main-with-upstream
|
||||||
|
- sync-b12f-with-main
|
||||||
|
- sync-teutat3s-with-main
|
||||||
environment:
|
environment:
|
||||||
GITEA_SSH_KEY:
|
GITEA_SSH_KEY:
|
||||||
from_secret: gitea_ssh_key
|
from_secret: gitea_ssh_key
|
||||||
commands:
|
commands:
|
||||||
- ./.drone/setup_ssh.sh
|
- ./.drone/setup_ssh.sh
|
||||||
- git fetch
|
- git fetch
|
||||||
- git checkout devos
|
|
||||||
- git remote add devos git@git.b12f.io:pub-solar/devos
|
- git remote add devos git@git.b12f.io:pub-solar/devos
|
||||||
- git remote set-url origin git@git.b12f.io:pub-solar/os
|
- git remote set-url origin git@git.b12f.io:pub-solar/os
|
||||||
- git fetch --all
|
- git fetch --all
|
||||||
- git merge -X theirs devos/master
|
|
||||||
|
- name: "Sync 'devos' branch with upstream"
|
||||||
|
image: alpine/git
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- cron
|
||||||
|
cron:
|
||||||
|
- sync-main-with-upstream
|
||||||
|
environment:
|
||||||
|
GITEA_SSH_KEY:
|
||||||
|
from_secret: gitea_ssh_key
|
||||||
|
commands:
|
||||||
|
- ./.drone/setup_ssh.sh
|
||||||
|
- git checkout origin/devos
|
||||||
|
- git merge -X theirs devos/main
|
||||||
- git push origin devos
|
- git push origin devos
|
||||||
|
|
||||||
- name: "Sync $BRANCH with upstream"
|
- name: "Sync $BRANCH with upstream"
|
||||||
|
@ -30,14 +45,14 @@ steps:
|
||||||
event:
|
event:
|
||||||
- cron
|
- cron
|
||||||
cron:
|
cron:
|
||||||
- sync-master-with-upstream
|
- sync-main-with-upstream
|
||||||
- sync-b12f-with-master
|
- sync-b12f-with-main
|
||||||
- sync-teutat3s-with-master
|
- sync-teutat3s-with-main
|
||||||
environment:
|
environment:
|
||||||
GITEA_SSH_KEY:
|
GITEA_SSH_KEY:
|
||||||
from_secret: gitea_ssh_key
|
from_secret: gitea_ssh_key
|
||||||
commands:
|
commands:
|
||||||
- git checkout origin/master
|
- git checkout origin/main
|
||||||
- ./.drone/setup_ssh.sh
|
- ./.drone/setup_ssh.sh
|
||||||
- git remote set-url origin git@git.b12f.io:pub-solar/os
|
- git remote set-url origin git@git.b12f.io:pub-solar/os
|
||||||
- ./.drone/upstream-branch.sh
|
- ./.drone/upstream-branch.sh
|
||||||
|
@ -50,16 +65,16 @@ steps:
|
||||||
event:
|
event:
|
||||||
- cron
|
- cron
|
||||||
cron:
|
cron:
|
||||||
- sync-master-with-upstream
|
- sync-main-with-upstream
|
||||||
- sync-b12f-with-master
|
- sync-b12f-with-main
|
||||||
- sync-teutat3s-with-master
|
- sync-teutat3s-with-main
|
||||||
environment:
|
environment:
|
||||||
TEA_CONFIG:
|
TEA_CONFIG:
|
||||||
from_secret: tea_config
|
from_secret: tea_config
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p ~/.config/tea
|
- mkdir -p ~/.config/tea
|
||||||
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
|
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
|
||||||
- tea pulls create --base master --head devos
|
- tea pulls create --base main --head devos
|
||||||
|
|
||||||
- name: "Notify matrix"
|
- name: "Notify matrix"
|
||||||
image: plugins/matrix
|
image: plugins/matrix
|
||||||
|
@ -70,9 +85,9 @@ steps:
|
||||||
event:
|
event:
|
||||||
- cron
|
- cron
|
||||||
cron:
|
cron:
|
||||||
- sync-master-with-upstream
|
- sync-main-with-upstream
|
||||||
- sync-b12f-with-master
|
- sync-b12f-with-main
|
||||||
- sync-teutat3s-with-master
|
- sync-teutat3s-with-main
|
||||||
settings:
|
settings:
|
||||||
homeserver: https://matrix.pub.solar
|
homeserver: https://matrix.pub.solar
|
||||||
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
|
roomid: dfQBqwkhIzrFjMSsxy:pub.solar
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
LOCAL="$DRONE_BRANCH"
|
LOCAL="$DRONE_BRANCH"
|
||||||
[ "$LOCAL" = "master" ] && UPSTREAM=origin/devos || UPSTREAM=origin/master
|
[ "$LOCAL" = "main" ] && UPSTREAM=origin/devos || UPSTREAM=origin/main
|
||||||
|
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout "$LOCAL"
|
git checkout "$LOCAL"
|
||||||
|
|
Loading…
Reference in a new issue