-
Notifications
You must be signed in to change notification settings - Fork 141
52 lines (48 loc) · 1.66 KB
/
ci-github-action-auto-rebase.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
on:
pull_request_target:
types: [edited, auto_merge_enabled]
branches:
- github_actions_automatic_rebase
- develop
- main
push:
branches:
- develop
- main
jobs:
rebase:
if: |
contains(github.event.pull_request.body, '!-> Feel free to automatically rebase this PR. <-!')
&& github.event.pull_request.auto_merge
runs-on: ubuntu-latest
steps:
- name: Echo Github Context To Debug
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
- name: Checkout Action
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
run: tests/test_automation/github-actions/ci/run_step.sh rebase
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
QMCPACK_BOT_GPG_KEY: ${{ secrets.QMCPACK_BOT_GPG_KEY }}
QMCPACK_BOT_GPG_SIGNING_KEY: ${{ secrets.QMCPACK_BOT_GPG_SIGNING_KEY }}
trigger-rebase:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout Action
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Push Update To Opt'd in PR's
run: tests/test_automation/github-actions/ci/run_step.sh pull-rebase
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
QMCPACK_BOT_GPG_KEY: ${{ secrets.QMCPACK_BOT_GPG_KEY }}
QMCPACK_BOT_GPG_SIGNING_KEY: ${{ secrets.QMCPACK_BOT_GPG_SIGNING_KEY }}