add Git CI for sync with upstream repo

This commit is contained in:
Colgrave 2025-01-05 16:14:46 -05:00
parent a72a9f58d3
commit 00af8efc1a

View File

@ -0,0 +1,29 @@
when:
event: [ cron, manual ]
cron: "sync"
clone:
- name: clone
image: woodpeckerci/plugin-git
settings:
depth: 0
lfs: false
partial: false
steps:
- name: sync
image: docker.io/alpine/git
environment:
MAIL:
from_secret: mail
CODEBERG_TOKEN:
from_secret: codeberg_token
commands:
- git remote set-url origin https://$CODEBERG_TOKEN@codeberg.org/<YOUR_FORK>
- git config user.email $MAIL
- git config user.name "Woodpecker CI"
- git remote add upstream https://codeberg.org/<UPSTREAM_REPO>
- git fetch upstream
- git checkout main
- git merge upstream/main
- git push origin main