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
|
2023-10-13 01:51:44 +03:00
|
|
|
if: github.actor == 'dependabot[bot]'
|
2022-05-27 14:46:48 +03:00
|
|
|
steps:
|
|
|
|
- name: Dependabot metadata
|
|
|
|
id: metadata
|
2024-07-09 16:47:40 +03:00
|
|
|
uses: dependabot/fetch-metadata@v2.2.0
|
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
|
2023-10-13 01:51:44 +03:00
|
|
|
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
2022-07-29 12:20:37 +03:00
|
|
|
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
|
2023-10-13 01:51:44 +03:00
|
|
|
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}}
|