Skip to content

Sync PocketMine-MP primary branches #5

Sync PocketMine-MP primary branches

Sync PocketMine-MP primary branches #5

name: Sync PocketMine-MP primary branches
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to update'
required: true
type: choice
options:
- minor-next
- major-next
- "*"
jobs:
merge:
name: Sync branches
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/PocketMine-MP # to allow testing on forks without editing the workflow
fetch-depth: 0
ssh-key: ${{ secrets.POCKETMINE_MP_DEPLOY_KEY }}
- name: Set Git config
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Merge "stable" into "minor-next"
if: contains(fromJSON('["minor-next", "*"]'), github.event.inputs.branch)
run: |
git checkout -f minor-next
git pull --ff origin stable
- name: Merge "minor-next" into "major-next"
if: contains(fromJSON('["major-next", "*"]'), github.event.inputs.branch)
run: |
git checkout -f major-next
git pull --ff origin minor-next
- name: Push changes
run: git push origin minor-next major-next