Skip to content

Commit e112a92

Browse files
aliceisjustplayingactions-user
authored andcommitted
Add sync workflow with upstream
1 parent 663d439 commit e112a92

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/sync.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Sync with upstream
2+
3+
on:
4+
schedule:
5+
- cron: '0 * * * *'
6+
7+
jobs:
8+
sync:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout main branch of fork
12+
uses: actions/checkout@v4
13+
with:
14+
ref: 'main'
15+
fetch-depth: 0
16+
token: ${{ secrets.REPO_SYNC_TOKEN }}
17+
18+
- name: Setup Git identity
19+
run: |
20+
git config user.name 'GitHub Actions'
21+
git config user.email 'actions@github.com'
22+
23+
- name: Add remote upstream
24+
run: git remote add upstream https://github.com/nesbox/TIC-80.git
25+
26+
- name: Fetch all history for all branches
27+
run: |
28+
git fetch --all
29+
30+
- name: Rebase changes
31+
run: git rebase upstream/main
32+
33+
- name: Push changes
34+
run: git push origin main --force-with-lease
35+

0 commit comments

Comments
 (0)