Skip to content

Commit

Permalink
Add dependabot-automerge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wsanchez authored Nov 10, 2023
1 parent c732623 commit 25aef00
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Auto-merge Dependabot PRs

on: pull_request

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
name: Auto-merge

runs-on: ubuntu-latest

if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Get Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve the PR
run: gh pr review --approve "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

0 comments on commit 25aef00

Please sign in to comment.