Skip to content

Commit

Permalink
Add sync workflow with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
aliceisjustplaying authored and actions-user committed Jan 5, 2025
1 parent d348ab1 commit fa1503b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Sync with upstream

on:
schedule:
- cron: '0 * * * *'

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

0 comments on commit fa1503b

Please sign in to comment.