homebrew-cask/.github/workflows/rebase.yml

39 lines
1.4 KiB
YAML

name: Rebase Pull Request
on:
repository_dispatch:
types: [rebase-command]
permissions:
contents: read
jobs:
rebase_pull_request:
name: Rebase Pull Request
runs-on: ubuntu-latest
steps:
- name: Rebase Pull Request
uses: peter-evans/rebase@56c359b35ff7ba8426d0fdb842958b35b1db8277
id: rebase
with:
token: ${{ secrets.HOMEBREW_CASK_REBASE_TOKEN }}
head: ${{ github.event.client_payload.pull_request.head.label }}
- name: Add 👍 Reaction
if: always() && steps.rebase.outputs.rebased-count == 1
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
with:
token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: '+1'
- name: Add 👎 Reaction
if: always() && steps.rebase.outputs.rebased-count != 1
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
with:
token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: '-1'