forked from benhason1/nestjs-http-promise
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (28 loc) · 1.02 KB
/
auto-merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
uses: dependabot/[email protected]
with:
github-token: ${{ secrets.PUSH_TOKEN }}
- 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:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
- 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:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}