name: Automatic Merge
on:
  workflow_dispatch:
  schedule:
    # https://crontab.guru/every-hour
    - cron: 0 * * * *

jobs:
  merge:
    name: Merge Pull Requests
    runs-on: ubuntu-latest
    if: ${{ github.repository_owner == 'wp-cli' }}
    steps:
      - name: Merge
        uses: nucleos/auto-merge-action@1.3.0
        env:
          "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
        with:
          label: automerge
