Skip to content

Commit 03167e5

Browse files
committed
Add github workflow
1 parent bb09e2b commit 03167e5

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout target repo
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Sync with Upstream
19+
run: |
20+
git config user.name "github-actions[bot]"
21+
git config user.email "github-actions[bot]@users.noreply.github.com"
22+
git remote add upstream https://github.com/futo-org/polycentric.git
23+
git fetch upstream
24+
git checkout -B origin/develop develop
25+
git merge upstream/develop --ff-only || (echo "Conflict detected, manual intervention required" && exit 1)
26+
git push origin develop

0 commit comments

Comments
 (0)