# See https://github.com/ridedott/merge-me-action/
# This workflow automates merges from patches sent by Dependabot, and
# only by dependabot, once the other CI workflows pass
name: Auto-merge Dependabot PRs

on:
  workflow_run:
    types:
      - completed
    workflows:
      - "build"

jobs:
  merge-me:
    name: Auto-merge Dependabot PRs
    runs-on: ubuntu-latest
    steps:
      - name: Auto-Merge
        if: ${{ github.event.workflow_run.conclusion == 'success' }}
        uses: ridedott/merge-me-action@v2.10.42
        with:
          # This must be used as GitHub Actions token does not support pushing
          # to protected branches.
          GITHUB_TOKEN: ${{ secrets.MERGE_TOKEN }}
