Skip to content

Commit

Permalink
Improvements to auto-merge actions for Dependabot.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdlaird committed May 17, 2024
1 parent 391d459 commit 94ff1e6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
5 changes: 0 additions & 5 deletions .github/FUNDING.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto-Merge Dependabot PRs

on:
pull_request:

jobs:
automerge:
name: Auto-Merge Dependabot PRs

runs-on: ubuntu-latest

permissions:
pull-requests: write
contents: write

if: github.actor == 'dependabot[bot]'
steps:
- name: Get Dependabot metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge
run: |
gh pr review --approve "$PR_URL"
gh pr merge --squash --auto "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 1 addition & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,4 @@ jobs:
- name: Install dependencies
run: make install
- name: Test
run: make test

automerge:
name: "Auto Approve"
needs: build
runs-on: ubuntu-latest

permissions:
pull-requests: write
contents: write

steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
target: major
use-github-auto-merge: true
run: make test

0 comments on commit 94ff1e6

Please sign in to comment.