forked from PluralFlux/PluralFlux
Add .gitea/workflows/sync-from-mirror.yaml
This commit is contained in:
23
.gitea/workflows/sync-from-mirror.yaml
Normal file
23
.gitea/workflows/sync-from-mirror.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Auto-Sync from Mirror
|
||||
on:
|
||||
# This triggers when the MIRROR repo gets an update
|
||||
push:
|
||||
branches: [main,develop]
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest # Your local gitea runner
|
||||
steps:
|
||||
- name: Checkout Fork
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Pull from Mirror
|
||||
run: |
|
||||
git remote add upstream https://engineering.sanya.gay/PluralFlux/PluralFlux.git
|
||||
git fetch upstream --prune
|
||||
git push origin "refs/remotes/upstream/*:refs/heads/*" --force-with-lease
|
||||
git merge upstream/main -m "Syncing from github"
|
||||
git push origin main
|
||||
Reference in New Issue
Block a user