2022-05-27 14:46:48 +03:00
|
|
|
name: Dependabot auto-merge
|
|
|
|
on: pull_request
|
|
|
|
|
2022-07-29 12:20:37 +03:00
|
|
|
permissions: write-all
|
2022-05-27 14:46:48 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
dependabot:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
|
|
steps:
|
|
|
|
- name: Dependabot metadata
|
|
|
|
id: metadata
|
2022-07-05 17:21:31 +03:00
|
|
|
uses: dependabot/fetch-metadata@v1.3.3
|
2022-05-27 14:46:48 +03:00
|
|
|
with:
|
|
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
2022-07-29 12:20:37 +03:00
|
|
|
- name: Approve Dependabot PRs
|
|
|
|
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
|
|
|
run: gh pr review --approve "$PR_URL"
|
|
|
|
env:
|
|
|
|
PR_URL: ${{github.event.pull_request.html_url}}
|
|
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
2022-05-27 14:46:48 +03:00
|
|
|
- name: Enable auto-merge for Dependabot PRs
|
|
|
|
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
2022-07-02 15:08:59 +03:00
|
|
|
run: gh pr merge --auto --squash "$PR_URL"
|
2022-05-27 14:46:48 +03:00
|
|
|
env:
|
|
|
|
PR_URL: ${{github.event.pull_request.html_url}}
|
|
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|