Skip to content

Commit

Permalink
Add auto merge dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
rbonghi committed Feb 10, 2025
1 parent 46413c4 commit 7513137
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Auto-approve and merge Dependabot PRs

on:
pull_request:
types:
- opened
- synchronize
- reopened

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

auto-merge:
needs: auto-approve
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge
if: github.actor == 'dependabot[bot]'
run: |
gh pr merge --auto --squash "$GITHUB_REF"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7513137

Please sign in to comment.