-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.1 KB
/
dependabot-auto-merge.yaml
File metadata and controls
39 lines (33 loc) · 1.1 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
on:
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
name: Auto-merge patch
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-24.04
steps:
- uses: dependabot/fetch-metadata@v3
id: metadata
- name: Generate app token
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Approve PR
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr review "$PR" --approve
env:
PR: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Enable auto-merge
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge "$PR" --auto --squash
env:
PR: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ github.token }}