forked from nesbox/TIC-80
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 806 Bytes
/
sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Sync with upstream
on:
schedule:
- cron: '0 6 * * *'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch of fork
uses: actions/checkout@v4
with:
ref: 'main'
fetch-depth: 0
token: ${{ secrets.REPO_SYNC_TOKEN }}
- name: Setup Git identity
run: |
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
- name: Add remote upstream
run: git remote add upstream https://github.com/nesbox/TIC-80.git
- name: Fetch all history for all branches
run: |
git fetch --all
- name: Rebase changes
run: git rebase upstream/main
- name: Push changes
run: git push origin main --force-with-lease