Skip to content

Commit

Permalink
Create dependabot-automerge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk authored Sep 22, 2023
1 parent 22e047e commit 2ba4d0d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependabot and CI auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge "$PR_URL" --auto --body "" --squash
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Auto-approve Dependabot PRs
uses: hmarr/auto-approve-action@v3

0 comments on commit 2ba4d0d

Please sign in to comment.