Skip to content

Commit b3ca674

Browse files
committed
Switch to workflow dispatch for cross repo testing
The PR testing jobs were still using repository dispatch, but the target workflows had changed to use workflow dispatch.
1 parent baa6ecd commit b3ca674

File tree

3 files changed

+24
-64
lines changed

3 files changed

+24
-64
lines changed

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

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/dispatch-matrix-test-on-comment.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,19 @@ jobs:
2626
owner: ${{ github.repository_owner }}
2727
repositories: "codeql-coding-standards-release-engineering"
2828

29-
- name: Dispatch Matrix Testing Job
29+
- name: Invoke matrix testing job
3030
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') && steps.check-write-permission.outputs.has-permission }}
31-
uses: peter-evans/repository-dispatch@v2
32-
with:
33-
token: ${{ steps.generate-token.outputs.token }}
34-
repository: github/codeql-coding-standards-release-engineering
35-
event-type: matrix-test
36-
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
31+
env:
32+
ISSUE_NR: ${{ github.event.issue.number }}
33+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
34+
run: |
35+
jq -n \
36+
--arg issue_nr "$ISSUE_NR" \
37+
'{"issue-nr": $issue_nr}' \
38+
| \
39+
gh workflow run pr-compiler-validation.yml \
40+
--json \
41+
-R github/codeql-coding-standards-release-engineering
3742
3843
- uses: actions/github-script@v6
3944
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-matrix') && steps.check-write-permission.outputs.has-permission }}

.github/workflows/dispatch-release-performance-check.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,19 @@ jobs:
2626
owner: ${{ github.repository_owner }}
2727
repositories: "codeql-coding-standards-release-engineering"
2828

29-
- name: Dispatch Performance Testing Job
29+
- name: Invoke performance test
3030
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') && steps.check-write-permission.outputs.has-permission }}
31-
uses: peter-evans/repository-dispatch@v2
32-
with:
33-
token: ${{ steps.generate-token.outputs.token }}
34-
repository: github/codeql-coding-standards-release-engineering
35-
event-type: performance-test
36-
client-payload: '{"pr": "${{ github.event.issue.number }}"}'
31+
env:
32+
ISSUE_NR: ${{ github.event.issue.number }}
33+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
34+
run: |
35+
jq -n \
36+
--arg issue_nr "$ISSUE_NR" \
37+
'{"issue-nr": $issue_nr}' \
38+
| \
39+
gh workflow run pr-performance-testing.yml \
40+
--json \
41+
-R github/codeql-coding-standards-release-engineering
3742
3843
- uses: actions/github-script@v6
3944
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/test-performance') && steps.check-write-permission.outputs.has-permission }}

0 commit comments

Comments
 (0)