Skip to content

Commit

Permalink
chore: add branches sync [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
abaicus committed Jul 13, 2023
1 parent 443646d commit f0fa393
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/sync-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Sync branches
on:
push:
branches:
- 'master'
jobs:
sync-branch:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Codeinwp' }} #Disable on forks
steps:
- uses: actions/checkout@master
- name: Retrieve branch name
id: retrieve-branch-name
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
- name: Merge master -> development
if: ${{ steps.retrieve-branch-name.outputs.branch_name == 'master' }}
uses: Codeinwp/merge-branch@master
with:
type: now
from_branch: master
target_branch: development
github_token: ${{ secrets.BOT_TOKEN }}
- name: Merge master -> next
if: ${{ steps.retrieve-branch-name.outputs.branch_name == 'master' }}
uses: Codeinwp/merge-branch@master
with:
type: now
from_branch: master
target_branch: next
github_token: ${{ secrets.BOT_TOKEN }}

0 comments on commit f0fa393

Please sign in to comment.