Sync with upstream #3144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |