-
Notifications
You must be signed in to change notification settings - Fork 72
33 lines (30 loc) · 1.12 KB
/
pr-comment-trigger-gitlab.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
---
name: PR Comment Trigger
on:
issue_comment:
types:
- created
jobs:
comment-trigger:
runs-on: ubuntu-latest
env:
USER_LIST: ${{ secrets.AUTH_LIST }}
TRIGGER_STRING: 'Do.Tests'
steps:
- name: Initialization Notice
if: ${{ (github.event.comment.body == env.TRIGGER_STRING) && contains( env.USER_LIST, github.event.comment.user.login) }}
uses: actions/github-script@v4
with:
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Tests Initiated.',
});
- name: Checkout
if: ${{ (github.event.comment.body == env.TRIGGER_STRING) && contains( env.USER_LIST, github.event.comment.user.login) }}
uses: actions/checkout@v3
- name: Trigger GitHub Mirror
if: ${{ (github.event.comment.body == env.TRIGGER_STRING) && contains( env.USER_LIST, github.event.comment.user.login) }}
run: .github/workflows/id_most_recent_comment_on_PR.sh ${{secrets.GITLAB_TRIGGER_TOKEN}}