mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-09-12 05:15:00 -04:00
add Git CI for sync with upstream repo
This commit is contained in:
parent
a72a9f58d3
commit
00af8efc1a
29
Git/.woodpecker/.sync.yaml
Normal file
29
Git/.woodpecker/.sync.yaml
Normal 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
|
Loading…
x
Reference in New Issue
Block a user