2023-07-05 23:03:40 +00:00
|
|
|
name: auto-merge
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
auto-merge:
|
|
|
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Dependabot metadata
|
|
|
|
id: dependabot-metadata
|
2024-07-05 14:49:28 +00:00
|
|
|
uses: dependabot/fetch-metadata@v2.2.0
|
2023-07-05 23:03:40 +00:00
|
|
|
with:
|
2023-07-25 00:26:39 +00:00
|
|
|
github-token: ${{ secrets.PUSH_TOKEN }}
|
2023-07-05 23:03:40 +00:00
|
|
|
|
|
|
|
- name: Approve Pull Request
|
|
|
|
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
|
|
|
|
run: gh pr review -R "${{ github.repository }}" --approve "${{ github.event.pull_request.number }}"
|
|
|
|
env:
|
2023-07-25 00:26:39 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
|
2023-07-05 23:03:40 +00:00
|
|
|
|
|
|
|
- name: Enable auto-merge for Dependabot PRs
|
|
|
|
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
|
|
|
|
run: gh pr merge -R "${{ github.repository }}" --merge --auto "${{ github.event.pull_request.number }}"
|
|
|
|
env:
|
2023-07-25 00:26:39 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
|