auto-merge.yml 604 B

12345678910111213141516171819202122
  1. name: Dependabot auto-merge
  2. on: pull_request_target
  3. permissions:
  4. pull-requests: write
  5. contents: write
  6. jobs:
  7. dependabot:
  8. runs-on: ubuntu-latest
  9. if: ${{ github.actor == 'dependabot[bot]' }}
  10. steps:
  11. - name: Dependabot metadata
  12. id: metadata
  13. uses: dependabot/fetch-metadata@v2
  14. with:
  15. github-token: "${{ secrets.GITHUB_TOKEN }}"
  16. - name: Enable auto-merge for Dependabot PRs
  17. run: gh pr merge --auto --squash "$PR_URL"
  18. env:
  19. PR_URL: ${{github.event.pull_request.html_url}}
  20. GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}