-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devops: add auto-rebase github action
The action is triggered with a `/rebase` comment. Details: https://github.com/cirrus-actions/rebase
- Loading branch information
1 parent
2ddc987
commit 9cd6157
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
on: | ||
issue_comment: | ||
types: [created] | ||
name: Automatic Rebase | ||
jobs: | ||
rebase: | ||
name: Rebase | ||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/rebase@1.2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# https://git.luolix.topmunity/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250 | ||
always_job: | ||
name: Always run job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Always run | ||
run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped." |