-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 1.02 KB
/
auto-merge.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
name: Auto Merge Develop to Staging
on:
push:
branches:
- develop
jobs:
merge_to_staging:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Fetch All Branches
run: git fetch origin +refs/heads/*:refs/remotes/origin/*
- name: Check out Staging Branch
run: git checkout origin/staging -B staging
- name: Merge Develop into Staging
run: |
git merge origin/develop --no-ff --commit -m "Auto-merged develop into staging"
- name: Push to Staging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git remote set-url origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/Hoxtygen/home360-server.git
git push origin staging