-
Notifications
You must be signed in to change notification settings - Fork 7
31 lines (25 loc) · 1.09 KB
/
merge-dependabot.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
name: Dependabot auto-merge
on: pull_request
permissions:
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v4
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
- name: Auto-merge patches
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
GH_TOKEN: ${{ secrets.DEPENDABOT_NODE_TOKEN }}
PR_URL: ${{github.event.pull_request.html_url}}
- name: Auto-merge dev-deps
if: ${{ steps.dependabot-metadata.outputs.dependency-type == "direct:development" && steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
GH_TOKEN: ${{ secrets.DEPENDABOT_NODE_TOKEN }}
PR_URL: ${{github.event.pull_request.html_url}}