File tree 1 file changed +44
-0
lines changed
1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This file was added by Pulumi and should not be edited manually.
2
+
3
+ name : Rebase command
4
+
5
+ on :
6
+ issue_comment :
7
+ types : [ created ]
8
+
9
+ jobs :
10
+ rebase :
11
+ runs-on : ubuntu-latest
12
+ timeout-minutes : 5
13
+
14
+ # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment
15
+ if : github.event.issue.pull_request && github.event.comment.body == '/rebase' && github.event.comment.author_association == 'MEMBER'
16
+
17
+ permissions :
18
+ contents : read
19
+ pull-requests : read
20
+
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+ with :
24
+ # https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
25
+ fetch-depth : 0
26
+ ssh-key : ${{ secrets.WORKFLOW_DEPLOY_KEY }}
27
+ show-progress : false
28
+
29
+ - name : Checkout PR
30
+ env :
31
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ run : |
33
+ gh pr checkout ${{ github.event.issue.number }}
34
+
35
+ # Warning: beware of running any user-injected content from this point on (CWE-829)!
36
+
37
+ - name : Rebase and push
38
+ run : |
39
+ git config user.name 'github-actions[bot]'
40
+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
41
+
42
+ GIT_SEQUENCE_EDITOR=true git rebase --interactive --autosquash origin/master
43
+
44
+ git push -u origin HEAD --force-with-lease
You can’t perform that action at this time.
0 commit comments