Sync with Upstream #363
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 0 * * *' | |
workflow_dispatch: | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name 'Shanwer' | |
git config user.email '[email protected]' | |
- name: Add upstream remote | |
run: git remote add upstream https://github.com/GeyserMC/Geyser.git | |
- name: Fetch upstream changes | |
run: git fetch upstream | |
- name: Merge upstream changes | |
run: | | |
git merge upstream/master || { | |
echo "Merge conflict detected! Notifying for manual intervention." | |
exit 1 | |
} | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: 'master' |