Skip to content

Commit 25d82e7

Browse files
authored
Merge pull request #267 from github/jsinglet/slash-matrix
quiet down matrix testing
2 parents 9822ec6 + 8f93732 commit 25d82e7

File tree

2 files changed

+44
-1
lines changed

2 files changed

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

0 commit comments

Comments
 (0)