Skip to content

Commit

Permalink
dependabot-automerge
Browse files Browse the repository at this point in the history
  • Loading branch information
vicary committed Nov 23, 2021
1 parent de8475a commit 48bd82e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/dependabot-automerge.yml
@@ -0,0 +1,32 @@
name: Auto-merge Dependabot minors

on:
pull_request_target:
workflow_run:
workflows:
- Tests
types:
- completed

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve and merge minor updates
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
run: |
gh pr review --approve "$PR_URL"
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 48bd82e

Please sign in to comment.