name: Automatic Rebase
on:
  repository_dispatch:
    types: [ auto-rebase-command ]
jobs:
  rebase:
    name: Rebase
    runs-on: ubuntu-latest
    steps:
      - name: Checkout the latest code
        uses: actions/checkout@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          fetch-depth: 0
      - name: Automatic Rebase
        uses: cirrus-actions/rebase@1.2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
