Skip to content

Commit f342493

Browse files
committed
[skip ci] add sync branch
1 parent 4d6b1a4 commit f342493

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/sync-branches.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Sync branches
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
jobs:
7+
sync-branch:
8+
runs-on: ubuntu-latest
9+
if: ${{ github.repository_owner == 'Codeinwp' }} #Disable on forks
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: Retrieve branch name
13+
id: retrieve-branch-name
14+
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
15+
- name: Merge master -> development
16+
if: ${{ steps.retrieve-branch-name.outputs.branch_name == 'master' }}
17+
uses: Codeinwp/merge-branch@master
18+
with:
19+
type: now
20+
from_branch: master
21+
target_branch: development
22+
github_token: ${{ secrets.BOT_TOKEN }}

0 commit comments

Comments
 (0)