-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.22 KB
/
dependabot-auto-merge.yml
File metadata and controls
39 lines (34 loc) · 1.22 KB
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
34
35
36
37
38
39
name: Dependabot Auto-merge (minor & patch)
on:
pull_request_target:
types: [ opened, synchronize, reopened, labeled ]
permissions:
contents: write
pull-requests: write
checks: read
jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Fetch metadata
id: meta
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve PR (minor/patch)
if: |
steps.meta.outputs.update-type == 'version-update:semver-minor' ||
steps.meta.outputs.update-type == 'version-update:semver-patch'
uses: peter-evans/approve-pull-request@v6
with:
pull-request-number: ${{ github.event.pull_request.number }}
review-message: "Auto-approved by workflow for minor/patch updates."
- name: Enable auto-merge (squash)
if: |
steps.meta.outputs.update-type == 'version-update:semver-minor' ||
steps.meta.outputs.update-type == 'version-update:semver-patch'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ github.event.pull_request.number }}
merge-method: squash