Skip to content

Commit e46f55a

Browse files
satya164okwasniewski
authored andcommitted
chore: add workflow to rebase PRs
1 parent 6732e0b commit e46f55a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/rebase.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Automatic Rebase
2+
on:
3+
issue_comment:
4+
types: [created]
5+
6+
jobs:
7+
rebase:
8+
name: Rebase
9+
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Automatic Rebase
18+
uses: cirrus-actions/rebase@1.2
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
22+
# https://hub.490633.xyzmunity/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250
23+
always_job:
24+
name: Always run job
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Always run
28+
run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped."

0 commit comments

Comments
 (0)