Skip to content

Instantly share code, notes, and snippets.

@longnd
Created May 27, 2021 01:09
Show Gist options
  • Save longnd/57a701f1757acf98c9c1f9ffc0db8a7e to your computer and use it in GitHub Desktop.
Save longnd/57a701f1757acf98c9c1f9ffc0db8a7e to your computer and use it in GitHub Desktop.
Rebase workflow for Github action
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 repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Rebase automatically
uses: cirrus-actions/rebase@1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment