Skip to content

Commit a6fad12

Browse files
Configure special branches to auto-merge on push
The branches that will get merged on push are * `release-next` into `main` * `release-next` into `ornl-next` * `ornl-next` into `main`
1 parent c3ac465 commit a6fad12

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/automerge.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# this uses the action to merge special branches on push
2+
# https://github.com/marketplace/actions/merge-branch
3+
name: Merge protected branches
4+
on:
5+
push:
6+
branches:
7+
- [ornl-next, release-next]
8+
9+
jobs:
10+
merge-relase-into-main:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.ref == release-next }}
13+
steps:
14+
- uses: actions/checkout@master
15+
16+
- name: Merge release-next into main
17+
uses: devmasx/merge-branch@master
18+
with:
19+
type: now
20+
target_branch: main
21+
message: Merge release-next into main
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
merge-ornl-into-main:
25+
runs-on: ubuntu-latest
26+
if: ${{ github.ref == ornl-next }}
27+
steps:
28+
- uses: actions/checkout@master
29+
30+
- name: Merge ornl-next into main
31+
uses: devmasx/merge-branch@master
32+
with:
33+
type: now
34+
target_branch: main
35+
message: Merge ornl-next into main
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
38+
merge-relase-into-ornl:
39+
runs-on: ubuntu-latest
40+
if: ${{ github.ref == release-next }}
41+
steps:
42+
- uses: actions/checkout@master
43+
44+
- name: Merge ornl-next into main
45+
uses: devmasx/merge-branch@master
46+
with:
47+
type: now
48+
target_branch: ornl-next
49+
message: Merge release-next into ornl-next
50+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)