Skip to content

Commit 33e29e2

Browse files
authored
Merge pull request #8 from os2ulf/devops/add-automerge-to-staging
OS2UOL-79 add Github action to automerge to staging
2 parents 320e3f0 + 2bee803 commit 33e29e2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Auto Merge Release Branches to Staging
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
8+
jobs:
9+
merge-to-staging:
10+
runs-on: ubuntu-latest
11+
environment: Staging
12+
steps:
13+
- name: Check out the repository
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0 # Fetch all history for all tags and branches
17+
18+
- name: Configure Git
19+
run: |
20+
git config --global user.name "${{ github.actor }}"
21+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
22+
23+
- name: Merge release branch to staging
24+
run: |
25+
git fetch origin
26+
git checkout staging
27+
git merge ${{ github.ref }} --no-ff -m "Merging release branch ${{ github.ref }} into staging"
28+
git push origin staging

0 commit comments

Comments
 (0)