name: Master to Main on: workflow_run: workflows: Tests branches: master types: completed workflow_dispatch: jobs: merge-master-to-main: if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set Git config run: | git config --local user.email "actions@github.com" git config --local user.name "Github Actions" - name: Merge master back to dev run: | git fetch --unshallow git checkout main git pull git merge --ff origin/master -m "Auto-merge master to main" git push