Skip to content

Commit 2b28b68

Browse files
authored
Create sync-develop-with-main.yml
1 parent 8f32f32 commit 2b28b68

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Keep develop in sync with main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
merge-main-back-to-develop:
10+
timeout-minutes: 2
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
token: ${{ secrets.SYNC_TOKEN }}
16+
- name: Set Git config
17+
run: |
18+
git config --local user.email "[email protected]"
19+
git config --local user.name "Github Actions"
20+
- name: Merge main back to develop
21+
run: |
22+
git fetch --unshallow
23+
git checkout develop
24+
git pull
25+
git merge --no-ff origin/main -m "Auto-merge main back to develop"
26+
git push

0 commit comments

Comments
 (0)