Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dispatch-matrix-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request_target:
types: [synchronize,opened]
branches:
- "**"
- "matrix/**"
workflow_dispatch:

jobs:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/dispatch-matrix-test-on-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 🤖 Run Matrix Check (On Comment)

on:
issue_comment:
types: [created]

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.number }}"}'

- uses: actions/github-script@v6
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.**'
})