Skip to content

Commit 9dcaab7

Browse files
committed
Add github workflow
1 parent bb09e2b commit 9dcaab7

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Sync Fork
2+
3+
on:
4+
schedule:
5+
- cron: '0 * * * *' # Runs every hour
6+
workflow_dispatch: # Allows you to run it manually
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout target repo
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Sync with Upstream
17+
run: |
18+
git config user.name "github-actions[bot]"
19+
git config user.email "github-actions[bot]@users.noreply.github.com"
20+
git remote add upstream https://github.com/futo-org/polycentric.git
21+
git fetch upstream
22+
git checkout main
23+
git merge upstream/develop --ff-only || (echo "Conflict detected, manual intervention required" && exit 1)
24+
git push origin develop

0 commit comments

Comments
 (0)