-
Notifications
You must be signed in to change notification settings - Fork 21
54 lines (51 loc) · 1.94 KB
/
mergebot.yml
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
53
54
name: mergebot
on:
pull_request:
types: [opened, reopened, edited, synchronize, closed, labeled]
issue_comment:
branches: '**'
workflow_dispatch:
jobs:
handle:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.MERGEBOT_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set mergebot username
run: git config --global user.name d2iq-mergebot
- name: Set mergebot email
run: git config --global user.email [email protected]
- name: Set gpg key id
run: git config --global user.signingKey ${{ secrets.MERGEBOT_GPG_KEY_ID }}
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Fetch Mergebot code
uses: actions/checkout@v3
with:
repository: mesosphere/mergebot
path: mergebot_code/mergebot
persist-credentials: false
token: ${{ secrets.MERGEBOT_TOKEN }}
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install mergebot Python dependencies
run: pip install -r ./mergebot_code/mergebot/requirements.txt
- name: Run Mergebot
env:
LOG_STDOUT: "true"
EVENT_TYPE: ${{ github.event_name }}
RUN_ID: ${{ github.run_id }}
MERGEBOT_TC_USERNAME: ${{secrets.MERGEBOT_TC_USERNAME}}
MERGEBOT_TC_PASSWORD: ${{secrets.MERGEBOT_TC_PASSWORD}}
MERGEBOT_TC_TOKEN: ${{secrets.MERGEBOT_TC_TOKEN}}
MERGEBOT_JIRA_EMAIL: ${{secrets.MERGEBOT_JIRA_EMAIL}}
MERGEBOT_JIRA_TOKEN: ${{secrets.MERGEBOT_JIRA_TOKEN}}
run: export EVENT=$(cat ${{github.event_path}}); export MERGEBOT_CONFIG=$(cat mergebot-config.json); cd mergebot_code; cd mergebot; python __main__.py