forked from PaperMC/Folia
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.01 KB
/
auto-merge.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
35
36
37
38
39
40
41
42
43
44
name: Auto Merge Upstream
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- dev/1.20.2
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: Merge upstream changes
run: |
git checkout dev/1.20.2
git merge upstream/dev/1.20.2 --allow-unrelated-histories -Xtheirs
- name: Configure Git with Secret
run: |
git config --global user.signingkey ${{ secrets.RELEASE_KEY }}
- name: Push changes
run: git push origin dev/1.20.2
- name: Cleanup
run: |
git remote remove upstream