diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da252f4e4..059c11525 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,9 @@ jobs: publish: name: Publish - if: "startsWith(github.ref, 'refs/heads/master')" + if: | + startsWith(github.ref, 'refs/heads/master') + && ! contains(github.head_ref, 'refs/heads/chore/') needs: build runs-on: ubuntu-latest diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml new file mode 100644 index 000000000..2951b53e2 --- /dev/null +++ b/.github/workflows/rebase.yml @@ -0,0 +1,24 @@ +name: Rebase + +on: + issue_comment: + types: [created] + +jobs: + rebase: + name: Rebase + runs-on: ubuntu-latest + if: | + github.event.issue.pull_request != '' + && contains(github.event.comment.body, '/rebase') + && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') + + steps: + - name: Checkout the latest code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Automatic Rebase + uses: cirrus-actions/rebase@1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}