-
-
Notifications
You must be signed in to change notification settings - Fork 43
37 lines (33 loc) · 1.09 KB
/
Copy pathgh-dependabot-automerge.yml
File metadata and controls
37 lines (33 loc) · 1.09 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
name: Dependabot Automerge
on:
pull_request:
types:
# - edited # PR's base branch was changed
- opened
- reopened
- synchronize # PR's branch was edited (i.e. new commits)
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
# Require a valid PR title before enabling auto-merging
pr-renamer:
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
permissions:
contents: read # pr-renamer.yml
pull-requests: write # pr-renamer.yml (gh pr edit)
uses: ./.github/workflows/pr-renamer.yml
dependabot-automerge:
needs:
- pr-renamer
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
permissions:
contents: write # gh pr merge
repository-projects: read # gh pr merge
pull-requests: write # gh pr merge
runs-on: ubuntu-latest
steps:
- run: gh pr merge "${{ github.event.pull_request.number }}" --squash --auto
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}