-
Notifications
You must be signed in to change notification settings - Fork 174
26 lines (25 loc) · 1017 Bytes
/
pr_commands.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
name: PR comment ops
on: issue_comment
jobs:
pr_commented:
# This job only runs for pull request comments
name: PR comment
if: "${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/') }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install prerequisites
run: pip install -r CI/commands/requirements.txt
- name: Run command
env:
GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_ATHENA_BUILD_TRIGGER_TOKEN}}
GITLAB_TRIGGER_URL: https://gitlab.cern.ch/api/v4/projects/153873/trigger/pipeline
GITHUB_TOKEN: ${{ secrets.PR_COMMANDS_GH_TOKEN }}
run: |
echo "${{ github.event.comment.body }}" > body.txt
cat body.txt
CI/commands/pr_commands.py \
--pr ${{ github.event.issue.pull_request.url }} \
--body body.txt \
--sender ${{ github.event.comment.user.login }} \
--repository ${{ github.event.repository.full_name }}