Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/auto-merge-bot-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto-merge bot PRs
on:
workflow_run:
workflows: ["Test this action"]
types: [completed]

permissions:
contents: write
pull-requests: write

jobs:
auto-merge:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.actor.login == 'ruby-builder-bot' &&
github.event.workflow_run.pull_requests[0].user.login == 'ruby-builder-bot' &&
github.event.workflow_run.pull_requests[0].head.repo.full_name == 'ruby-builder-bot/setup-ruby'
steps:
- name: Merge PR
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr merge "${{ github.event.workflow_run.pull_requests[0].number }}" \
--repo "${{ github.repository }}" \
--squash \
Copy link
Member

@eregon eregon Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--squash \
--rebase \

Because I always use Rebase and merge in this repo

--delete-branch