2022-08-20 19:07:33 +00:00
|
|
|
name: Automatic Rebase
|
|
|
|
on:
|
|
|
|
issue_comment:
|
|
|
|
types: [created]
|
|
|
|
jobs:
|
|
|
|
rebase:
|
|
|
|
name: Rebase
|
2022-08-20 19:13:56 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-08-20 19:07:33 +00:00
|
|
|
if: >-
|
|
|
|
github.event.issue.pull_request != '' &&
|
|
|
|
(
|
|
|
|
contains(github.event.comment.body, '/rebase') ||
|
|
|
|
contains(github.event.comment.body, '/autosquash')
|
|
|
|
)
|
|
|
|
steps:
|
2022-08-28 15:48:54 +00:00
|
|
|
- name: Checkout the latest code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.PAT_TOKEN }}
|
|
|
|
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
|
|
|
- name: Automatic Rebase
|
|
|
|
uses: cirrus-actions/rebase@1.5
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
|