Skip to content

Commit

Permalink
Create automerge-dependabot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
labi-le authored May 6, 2024
1 parent 06e5b20 commit 91de0d0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/automerge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "Dependabot Automerge - Action"

on:
pull_request:

permissions:
contents: write
pull-requests: write

jobs:
auto-merge:
name: DependabotMerge
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 91de0d0

Please sign in to comment.