Create dependabot.yml

This commit is contained in:
Francisco Hodge 2021-08-02 00:23:39 -07:00 committed by GitHub
parent 007a5996ed
commit bf16cf3636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

24
.github/workflows/dependabot.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Dependabot merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
- 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}}