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-03-22 14:05:49 +00:00
|
|
|
uses: dependabot/fetch-metadata@v2.0.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 }}
|