Add Auto Merge Forward for Dependabot PRs Workflow
This commit is contained in:
50
.github/workflows/auto-merge-forward.yml
vendored
Normal file
50
.github/workflows/auto-merge-forward.yml
vendored
Normal file
@@ -0,0 +1,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
|
||||||
|
|
||||||
|
test-action:
|
||||||
|
name: GitHub Actions Test
|
||||||
|
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 Auto Merge Forward
|
||||||
|
id: run-auto-merge-forward
|
||||||
|
uses: marcusdacoregio/auto-merge-forward@ad89c068e52e87d56654341691867889ed729e3e
|
||||||
|
with:
|
||||||
|
branches: '6.1.x, 6.2.x, main'
|
||||||
|
dry-run: true
|
||||||
|
from-author: dependabot[bot]
|
||||||
Reference in New Issue
Block a user