Skip to content

Commit

Permalink
feat: auto approve and merge pr by dependabot (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen authored and hopeyen committed Mar 21, 2023
1 parent b7b22df commit b6069bd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/auto-approve-n-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Auto approve and merge PRs by dependabot

on:
pull_request

jobs:
autoapprove:
name: Auto Approve a PR by dependabot
runs-on: ubuntu-latest
steps:
- name: Auto approve
uses: hmarr/[email protected]
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: ${{ secrets.DEPENDABOT_TOKEN }}
automerge:
name: Auto merge after successful checks
needs: autoapprove
runs-on: ubuntu-latest
steps:
- name: Auto merge
uses: pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
env:
GITHUB_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
MERGE_LABELS: dependencies
MERGE_METHOD: rebase

0 comments on commit b6069bd

Please sign in to comment.