From b21e62058380749c65e7d91652abd91d976e33ad Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 12:14:38 -0500 Subject: [PATCH 1/8] pr auths --- .github/workflows/dispatch-matrix-check.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-matrix-check.yml b/.github/workflows/dispatch-matrix-check.yml index 7da92294c2..b3fc030e40 100644 --- a/.github/workflows/dispatch-matrix-check.yml +++ b/.github/workflows/dispatch-matrix-check.yml @@ -1,7 +1,8 @@ name: 🤖 Run Matrix Check on: - pull_request: + pull_request_target: + types: [synchronize,opened] branches: - "**" workflow_dispatch: @@ -11,7 +12,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Test Variables + shell: pwsh + run: | + Write-Host "Running as: ${{github.actor}}" + - name: Dispatch Matrix Testing Job + if: contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }} @@ -21,6 +28,7 @@ jobs: - uses: actions/github-script@v6 + if: contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) with: script: | github.rest.issues.createComment({ From 3187901c2c3d257fe88ef2b4a787683752fa63ae Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 12:18:30 -0500 Subject: [PATCH 2/8] syntax --- .github/workflows/dispatch-matrix-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-matrix-check.yml b/.github/workflows/dispatch-matrix-check.yml index b3fc030e40..f888c720ae 100644 --- a/.github/workflows/dispatch-matrix-check.yml +++ b/.github/workflows/dispatch-matrix-check.yml @@ -18,7 +18,7 @@ jobs: Write-Host "Running as: ${{github.actor}}" - name: Dispatch Matrix Testing Job - if: contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) + if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) }} uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }} @@ -28,7 +28,7 @@ jobs: - uses: actions/github-script@v6 - if: contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) + if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) }} with: script: | github.rest.issues.createComment({ From 47f1da258df4a4eb1ef0f0757c99497afdea85c5 Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 12:25:29 -0500 Subject: [PATCH 3/8] work --- .github/workflows/dispatch-matrix-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-matrix-check.yml b/.github/workflows/dispatch-matrix-check.yml index f888c720ae..09e23b425f 100644 --- a/.github/workflows/dispatch-matrix-check.yml +++ b/.github/workflows/dispatch-matrix-check.yml @@ -18,7 +18,7 @@ jobs: Write-Host "Running as: ${{github.actor}}" - name: Dispatch Matrix Testing Job - if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) }} + if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }} @@ -28,7 +28,7 @@ jobs: - uses: actions/github-script@v6 - if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]')', github.actor) }} + if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} with: script: | github.rest.issues.createComment({ From e88dd9f714f5870f75259ae0d03915d63e2274db Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 12:43:13 -0500 Subject: [PATCH 4/8] test banning mauro --- .github/workflows/dispatch-matrix-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-matrix-check.yml b/.github/workflows/dispatch-matrix-check.yml index 09e23b425f..288e68cd51 100644 --- a/.github/workflows/dispatch-matrix-check.yml +++ b/.github/workflows/dispatch-matrix-check.yml @@ -18,7 +18,7 @@ jobs: Write-Host "Running as: ${{github.actor}}" - name: Dispatch Matrix Testing Job - if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} + if: ${{ contains(fromJSON('["jsinglet", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }} @@ -28,7 +28,7 @@ jobs: - uses: actions/github-script@v6 - if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} + if: ${{ contains(fromJSON('["jsinglet", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} with: script: | github.rest.issues.createComment({ From 23f819ea674cd277f0082e78cd7ce5d09d12e88b Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 12:46:52 -0500 Subject: [PATCH 5/8] test --- .github/workflows/dispatch-matrix-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-matrix-check.yml b/.github/workflows/dispatch-matrix-check.yml index 288e68cd51..aa5a4cc9d8 100644 --- a/.github/workflows/dispatch-matrix-check.yml +++ b/.github/workflows/dispatch-matrix-check.yml @@ -18,7 +18,7 @@ jobs: Write-Host "Running as: ${{github.actor}}" - name: Dispatch Matrix Testing Job - if: ${{ contains(fromJSON('["jsinglet", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} + if: ${{ contains(fromJSON('[ "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }} @@ -28,7 +28,7 @@ jobs: - uses: actions/github-script@v6 - if: ${{ contains(fromJSON('["jsinglet", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} + if: ${{ contains(fromJSON('[ "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} with: script: | github.rest.issues.createComment({ From f43b492f34dfac81e1977450d8d44a0fc2edcca9 Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 12:52:34 -0500 Subject: [PATCH 6/8] fixing --- .github/workflows/dispatch-matrix-check.yml | 4 ++-- .../dispatch-release-performance-check.yml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dispatch-matrix-check.yml b/.github/workflows/dispatch-matrix-check.yml index aa5a4cc9d8..09e23b425f 100644 --- a/.github/workflows/dispatch-matrix-check.yml +++ b/.github/workflows/dispatch-matrix-check.yml @@ -18,7 +18,7 @@ jobs: Write-Host "Running as: ${{github.actor}}" - name: Dispatch Matrix Testing Job - if: ${{ contains(fromJSON('[ "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} + if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }} @@ -28,7 +28,7 @@ jobs: - uses: actions/github-script@v6 - if: ${{ contains(fromJSON('[ "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} + if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }} with: script: | github.rest.issues.createComment({ diff --git a/.github/workflows/dispatch-release-performance-check.yml b/.github/workflows/dispatch-release-performance-check.yml index 05ef63c103..9fc68b9b97 100644 --- a/.github/workflows/dispatch-release-performance-check.yml +++ b/.github/workflows/dispatch-release-performance-check.yml @@ -13,6 +13,19 @@ jobs: runs-on: ubuntu-latest steps: + - name: Test Variables + shell: pwsh + run: | + Write-Host "Running as: ${{github.actor}}" + + $actor = "${{github.actor}}" + + $acl = @("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 Performance Testing Job if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') }} uses: peter-evans/repository-dispatch@v2 From a247b21e4ff78fdcb1ceffc6e91aa845e35b6c3d Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 12:58:09 -0500 Subject: [PATCH 7/8] fix check --- .github/workflows/dispatch-release-performance-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-release-performance-check.yml b/.github/workflows/dispatch-release-performance-check.yml index 9fc68b9b97..dceb2052a5 100644 --- a/.github/workflows/dispatch-release-performance-check.yml +++ b/.github/workflows/dispatch-release-performance-check.yml @@ -33,7 +33,7 @@ jobs: token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }} repository: github/codeql-coding-standards-release-engineering event-type: performance-test - client-payload: '{"pr": "${{ github.event.number }}"}' + client-payload: '{"pr": "${{ github.event.issue.number }}"}' - uses: actions/github-script@v6 From 80afe6e800c052b552ae091b58897617f73c7e93 Mon Sep 17 00:00:00 2001 From: "John L. Singleton" Date: Mon, 27 Feb 2023 13:03:45 -0500 Subject: [PATCH 8/8] acl --- .github/workflows/dispatch-release-performance-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dispatch-release-performance-check.yml b/.github/workflows/dispatch-release-performance-check.yml index dceb2052a5..abba5328bd 100644 --- a/.github/workflows/dispatch-release-performance-check.yml +++ b/.github/workflows/dispatch-release-performance-check.yml @@ -20,7 +20,7 @@ jobs: $actor = "${{github.actor}}" - $acl = @("mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine") + $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."