Skip to content

Commit

Permalink
Auto-merge dependabot feature - fixes
Browse files Browse the repository at this point in the history
Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>
  • Loading branch information
PrimalPimmy authored and Licenser committed May 2, 2022
1 parent eb718e9 commit c8bdda3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/depandabot-auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ on:

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.PAT_TOKEN }}
approve: true
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit c8bdda3

Please sign in to comment.