name: Merge main to dev on: workflow_run: workflows: [CI] types: [completed] branches: [main] jobs: merge: if: github.event.workflow_run.conclusion == 'success' runs-on: depot-ubuntu-24.04 permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 0 ref: dev - name: Merge main into dev env: GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}" git merge origin/main --no-edit git push origin dev