Skip to content

Commit

Permalink
Create dependabot-auto-merge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Lolle2000la authored Dec 11, 2023
1 parent b0595b8 commit 803f9f4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Auto Merge Dependabot PRs

on:
pull_request:
types:
- labeled

jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Enable auto-merge for Dependabot PRs
if: github.actor == 'dependabot[bot]' && github.event.pull_request.labels.*.name == 'dependencies'
run: |
PR_NUMBER=$(echo ${{ github.event.pull_request.number }})
echo "Enabling auto-merge for PR #$PR_NUMBER"
gh pr merge $PR_NUMBER --auto --squash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 803f9f4

Please sign in to comment.