name: Sync Community Branch

on:
  workflow_run:
    workflows:
      - "CI - Changelog"
      - "Release"
    types:
      - completed
    branches:
      - core

jobs:
  merge-core-to-community:
    name: Merge core -> community
    runs-on: ubuntu-latest

    steps:
      - uses: tukasz/direct-merge-action@master
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          source-branch: core
          target-branch: community