-
Notifications
You must be signed in to change notification settings - Fork 709
50 lines (45 loc) · 1.36 KB
/
auto-merge-forward.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Auto Merge Forward Dependabot PRs
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: auto-merge-forward
cancel-in-progress: false
jobs:
count-open-dependabot-prs:
name: Count Open Dependabot PRs
runs-on: ubuntu-latest
outputs:
prs_count: ${{ steps.count.outputs.prs_count }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- id: count
env:
GH_TOKEN: ${{ github.token }}
run: echo "prs_count=$(gh pr list --app dependabot --state open --json number --jq length)" >> $GITHUB_OUTPUT
merge-forward:
name: Merge Forward
runs-on: ubuntu-latest
needs: [count-open-dependabot-prs]
if: needs.count-open-dependabot-prs.outputs.prs_count == 0
permissions:
contents: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup GitHub User
id: setup-gh-user
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Run Merge Forward
id: run-auto-merge-forward
uses: marcusdacoregio/auto-merge-forward@9eac812bc73673e1a358766ac2ce319bd31ce0f8
with:
branches: '6.1.x, 6.2.x, main'
dry-run: false
from-author: dependabot[bot]