name: Automerge Dependabot PR

on:
  pull_request_target:
    branches: [ master ]

jobs:
  automerge:
    if: github.actor == 'dependabot[bot]'
    runs-on: ubuntu-latest

    steps:
      - name: Enable Automerge
        run: gh pr merge --auto --merge "$PR_URL"
        env:
          PR_URL: ${{ github.event.pull_request.html_url }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Approve
        uses: hmarr/auto-approve-action@v2.1.0
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

name: Automerge Dependabot PR

on:
  pull_request_target:
    branches: [ master ]

jobs:
  automerge:
    if: github.actor == 'dependabot[bot]'
    runs-on: ubuntu-latest

    steps:
      - name: Enable Automerge
        run: gh pr merge --auto --merge --squash "$PR_URL"
        env:
          PR_URL: ${{ github.event.pull_request.html_url }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Approve
        uses: hmarr/auto-approve-action@v2.1.0
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

Use squash merge method for dependabot
Use squash merge method for dependabot
