Skip to content

Commit 501d925

Browse files
authored
Add action to sync development branch
Signed-off-by: Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
1 parent ac93ff6 commit 501d925

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Sync Development Branch
2+
3+
on:
4+
push:
5+
branches:
6+
- 'version/2'
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
sync:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Set up SSH
18+
uses: webfactory/ssh-agent@v0.9.0
19+
with:
20+
ssh-private-key: ${{ secrets.DEPLOYBOT_SSH_PRIVATE_KEY }}
21+
22+
- name: Set up Git
23+
run: |
24+
git config --global user.email "${{ secrets.DEPLOYBOT_EMAIL }}"
25+
git config --global user.name "${{ secrets.DEPLOYBOT_USER }}"
26+
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
token: ${{ secrets.DEPLOYBOT_API_TOKEN }}
32+
ssh-key: ${{ secrets.DEPLOYBOT_SSH_PRIVATE_KEY }}
33+
34+
- name: Merge target branch
35+
run: |
36+
git checkout development
37+
git merge ${{ github.ref_name }}
38+
git push

0 commit comments

Comments
 (0)