name: 'Sync changes back to develop branch from master'

on:
  # Triggered manually
  workflow_dispatch:
  # Triggered by release-nocodb.yml
  workflow_call:
jobs:
  sync-to-develop:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Merge from master to develop
        uses: wingkwong/gh-action-nightly-merge@master
        with:
          stable_branch: 'master'
          development_branch: 'develop'
          allow_ff: true
          allow_forks: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}