Skip to content

Commit 3b9a6c5

Browse files
committed
quiet down matrix testing
1 parent 4a04ff2 commit 3b9a6c5

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.github/workflows/dispatch-matrix-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request_target:
55
types: [synchronize,opened]
66
branches:
7-
- "**"
7+
- "matrix/**"
88
workflow_dispatch:
99

1010
jobs:
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 🤖 Run Matrix Check (On Comment)
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
branches:
7+
- main
8+
- "rc/**"
9+
- next
10+
11+
jobs:
12+
dispatch-matrix-check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- name: Test Variables
17+
shell: pwsh
18+
run: |
19+
Write-Host "Running as: ${{github.actor}}"
20+
21+
$actor = "${{github.actor}}"
22+
23+
$acl = @("jsinglet","mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine")
24+
25+
if(-not ($actor -in $acl)){
26+
throw "Refusing to run workflow for user not in acl."
27+
}
28+
29+
30+
- name: Dispatch Matrix Testing Job
31+
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') }}
32+
uses: peter-evans/repository-dispatch@v2
33+
with:
34+
token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
35+
repository: github/codeql-coding-standards-release-engineering
36+
event-type: matrix-test
37+
client-payload: '{"pr": "${{ github.event.number }}"}'
38+
39+
- uses: actions/github-script@v6
40+
with:
41+
script: |
42+
github.rest.issues.createComment({
43+
issue_number: context.issue.number,
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
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.**'
47+
})

0 commit comments

Comments
 (0)