Skip to content

Commit

Permalink
Create dependabot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bgalek authored Apr 12, 2024
1 parent 6c587e4 commit d2597da
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Merge dependabot pull requests

on: [pull_request]

permissions:
contents: write
pull-requests: write

jobs:
auto-merge-dependabot:
if: github.actor == 'dependabot[bot]'
name: Auto-merge dependabot pull request
runs-on: [self-hosted, ubuntu-latest]
env:
GH_TOKEN: ${{ github.token }}

steps:
- name: Decline dependabot pull request with SNAPSHOT version
if: contains(github.ref_name, 'SNAPSHOT')
run: gh pr close ${{ github.event.pull_request.html_url }}

- name: Auto-merge dependabot pull request
run: |
gh pr review --approve ${{ github.event.pull_request.html_url }}
gh pr merge --merge --auto ${{ github.event.pull_request.html_url }}

0 comments on commit d2597da

Please sign in to comment.