Skip to content

Update automation access control list (ACL) #659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2024
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
18 changes: 8 additions & 10 deletions .github/workflows/dispatch-matrix-check.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 🤖 Run Matrix Check
name: 🤖 Run Matrix Check

on:
pull_request_target:
types: [synchronize,opened]
types: [synchronize, opened]
branches:
- "matrix/**"
workflow_dispatch:
Expand All @@ -11,29 +11,27 @@ jobs:
dispatch-matrix-check:
runs-on: ubuntu-22.04
steps:

- name: Test Variables
shell: pwsh
run: |
Write-Host "Running as: ${{github.actor}}"
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('["mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill"]'), github.actor) }}
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 }}"}'

client-payload: '{"pr": "${{ github.event.number }}"}'

- uses: actions/github-script@v6
if: ${{ contains(fromJSON('["jsinglet", "mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "kraiouchkine"]'), github.actor) }}
if: ${{ contains(fromJSON('["mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill"]'), github.actor) }}
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.**'
})
})
5 changes: 1 addition & 4 deletions .github/workflows/dispatch-matrix-test-on-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,23 @@ on:
- "rc/**"
- next


jobs:
dispatch-matrix-check:
runs-on: ubuntu-22.04
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")
$acl = @("mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill")

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
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/dispatch-release-performance-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ jobs:
dispatch-matrix-check:
runs-on: ubuntu-22.04
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")
$acl = @("mbaluda", "lcartey", "rvermeulen", "ravikprasad", "jeongsoolee09", "hohn", "knewbury01", "nicolaswill")

if(-not ($actor -in $acl)){
throw "Refusing to run workflow for user not in acl."
Expand All @@ -33,8 +32,7 @@ jobs:
token: ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
repository: github/codeql-coding-standards-release-engineering
event-type: performance-test
client-payload: '{"pr": "${{ github.event.issue.number }}"}'

client-payload: '{"pr": "${{ github.event.issue.number }}"}'

- uses: actions/github-script@v6
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') }}
Expand All @@ -45,4 +43,4 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
body: '🏁 Beep Boop! Performance testing for this PR has been initiated. Please check back later for results. Note that the query package generation step must complete before testing will start so it might be a minute. <br><br> :bulb: If you do not hear back from me please check my status! **I will report even if I fail!**'
})
})
Loading