.github/workflows/rebase.yml
name: Automatic Rebase Command
on:
repository_dispatch:
types: [rebase-command]
jobs:
rebase:
runs-on: ubuntu-latest
steps:
- uses: peter-evans/rebase@v3
id: rebase
with:
head: ${{ github.event.client_payload.pull_request.head.label }}
- name: Add reaction
if: steps.rebase.outputs.rebased-count == 1
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray