-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathdispatch-matrix-test-on-comment.yml
More file actions
49 lines (39 loc) · 1.7 KB
/
dispatch-matrix-test-on-comment.yml
File metadata and controls
49 lines (39 loc) · 1.7 KB
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
name: 🤖 Run Matrix Check (On Comment)
on:
issue_comment:
types: [created]
branches:
- main
- "rc/**"
- next
jobs:
dispatch-matrix-check:
runs-on: ubuntu-latest
steps:
- name: Test Variables
shell: pwsh
run: |
Write-Host "Running as: ${{github.actor}}"
$actor = "${{github.actor}}"
$acl = @("jsinglet","mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine")
if(-not ($actor -in $acl)){
throw "Refusing to run workflow for user not in acl."
}
- name: Dispatch Matrix Testing Job
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
repository: github/codeql-coding-standards-release-engineering
event-type: matrix-test
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
- uses: actions/github-script@v6
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') }}
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results. <br><br> :bulb: If you do not hear back from me please check my status! **I will report even if this PR does not contain files eligible for matrix testing.**'
})