Skip to content

Commit

Permalink
chore: Use gh cli to mark PR for auto-merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
avocadowastaken authored Aug 2, 2021
1 parent f5697bd commit 9b57776
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Auto-Merge
on:
pull_request_target:
types: [labeled]
name: Dependabot auto-merge
on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
enable-auto-merge:
dependabot:
runs-on: ubuntu-latest

if: github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'dependencies')
if: github.actor == 'dependabot[bot]'
steps:
- uses: alexwilson/enable-github-automerge-action@main
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9b57776

Please sign in to comment.