-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Auto Merge Forward for Dependabot PRs Workflow
- Loading branch information
1 parent
47185f8
commit b883eef
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |