diff --git a/.github/workflows/auto-rebase.yml b/.github/workflows/auto-rebase.yml new file mode 100644 index 0000000000..f8b0444ee3 --- /dev/null +++ b/.github/workflows/auto-rebase.yml @@ -0,0 +1,25 @@ +on: + # Run on every push on every branch + push: + branches-ignore: + # Ignore branches automatically created by github-rebase + - rebase-pull-request** + - cherry-pick-rebase-pull-request** + # Run when pull requests get labeled + pull_request: + types: [labeled] +jobs: + auto-rebase: + name: AutoRebase + runs-on: ubuntu-latest + steps: + - uses: Label305/AutoRebase@v0.1 + with: + # We can't use the built-in secrets.GITHUB_TOKEN yet because of this limitation: + # https://github.community/t5/GitHub-Actions/Triggering-a-new-workflow-from-another-workflow/td-p/31676 + # In the meantime, use a token granting write access on the repo: + # - a GitHub App token + # See https://github.com/marketplace/actions/github-app-token. + # - a personal access token + # See https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line. + github_token: ${{ secrets.AUTOREBASE_TOKEN }}