name: Dependabot auto-merge

on:
  pull_request_target

jobs:

  dependabot:
    runs-on: ubuntu-latest
    if: github.actor == 'dependabot[bot]'
    steps:
      
      - name: 'Auto approve PR by Dependabot'
        uses: hmarr/auto-approve-action@v2.0.0
        with:
          github-token: "${{ secrets.GITHUB_TOKEN }}"

      - name: 'Comment merge command'
        uses: actions/github-script@v3
        with:
          github-token: ${{secrets.GITHUB_TOKEN }}
          script: |
            await github.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: context.issue.number,
              body: '@dependabot merge'
            })
name: Dependabot auto-merge

on:
  pull_request_target

jobs:

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

      - name: 'Auto approve PR by Dependabot'
        uses: hmarr/auto-approve-action@v2.0.0
        with:
          github-token: "${{ secrets.PAT }}"

      - name: 'Comment merge command'
        uses: actions/github-script@v3
        with:
          github-token: ${{secrets.PAT }}
          script: |
            await github.issues.createComment({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: context.issue.number,
              body: '@dependabot merge'
            })

Use PAT in dependabot auto merge
Use PAT in dependabot auto merge
