-
Notifications
You must be signed in to change notification settings - Fork 153
41 lines (35 loc) · 1.28 KB
/
merge-branches.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
name: Merge postreleasefix with release and main branches
on:
pull_request:
types:
- closed # Run after closing PR
branches:
- 'postreleasefix/*'
permissions: write-all
jobs:
sync-branch:
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'auto-merge')
steps:
- uses: actions/checkout@main
- name: Set the release version
run: |
echo "release=$(echo ${GITHUB_REF} | grep -o [0-9]*$)" >> $GITHUB_ENV
- name: "Merge postreleasefix/${{ env.release }} -> main"
uses: devmasx/merge-branch@master
with:
type: now
from_branch: "postreleasefix/${{ env.release }}"
target_branch: main
github_token: ${{ secrets.ENSVAR }}
message: "Merge branch 'postreleasefix/${{ env.release }}'"
- name: "Merge postreleasefix/${{ env.release }} -> release/${{ env.release }}"
uses: devmasx/merge-branch@master
with:
type: now
from_branch: "postreleasefix/${{ env.release }}"
target_branch: "release/${{ env.release }}"
github_token: ${{ secrets.ENSVAR }}
message: "Merge branch 'postreleasefix/${{ env.release }}'"