Auto Merge Upstream ver/1.20.4 #198
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: Auto Merge Upstream ver/1.20.4 | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
auto-merge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.RELEASE_KEY }} | |
- name: Set up Git | |
run: | | |
git config user.name "${{ secrets.NAME }}" | |
git config user.email "${{ secrets.EMAIL }}" | |
git remote add upstream https://github.com/PaperMC/Folia | |
- name: Fetch upstream changes | |
run: git fetch upstream | |
- name: Switch to branch | |
run: git checkout -b dev/1.21 | |
- name: Merge upstream changes | |
run: | | |
git merge upstream/dev/1.21 --allow-unrelated-histories -Xtheirs | |
- name: Configure Git with Secret | |
run: | | |
git config --global user.signingkey ${{ secrets.RELEASE_KEY }} | |
- name: Push changes | |
run: git push -f origin dev/1.21 | |
- name: Cleanup | |
run: | | |
git remote remove upstream |