From 3371a8220c8e48503dc6dd4e2d6ac532ba9946ad Mon Sep 17 00:00:00 2001 From: JAremko Date: Tue, 6 Apr 2021 20:10:31 +0300 Subject: [PATCH] [CI]use comment based PR rebase --- .github/workflows/rebase.yml | 19 +++++++++++++++++++ .github/workflows/rebase_on_push.yml | 13 ------------- 2 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/rebase.yml delete mode 100644 .github/workflows/rebase_on_push.yml diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml new file mode 100644 index 000000000..d2a868fd3 --- /dev/null +++ b/.github/workflows/rebase.yml @@ -0,0 +1,19 @@ +name: Automatic Rebase +on: + issue_comment: + types: [created] +jobs: + rebase: + name: Rebase + if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') + runs-on: ubuntu-latest + steps: + - name: Checkout the latest code + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 # otherwise, you will fail to push refs to dest repo + - name: Automatic Rebase + uses: cirrus-actions/rebase@1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/rebase_on_push.yml b/.github/workflows/rebase_on_push.yml deleted file mode 100644 index c38075f66..000000000 --- a/.github/workflows/rebase_on_push.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Rebase -on: - push: - branches: [develop] -jobs: - rebase: - runs-on: ubuntu-latest - steps: - - uses: peter-evans/rebase@v1 - with: - base: develop - repository: syl20bnr/spacemacs - token: ${{ secrets.GITHUB_TOKEN }}