Skip to content

Commit a7b5c91

Browse files
committed
TEMP: trigger runner-trust-probe on PR for pre-merge verification
Signed-off-by: Ralf Juengling <[email protected]>
1 parent 2ba561a commit a7b5c91

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

‎.github/workflows/runner-trust-probe.yml‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@
88
name: "CI: Runner trust probe"
99

1010
on:
11+
# Temporary triggers for pre-merge PR verification (revert before merging):
12+
# - pull_request exercises GitHub-hosted labels immediately on the PR.
13+
# - push on pull-request/[0-9]+ exercises all labels (including self-hosted
14+
# CPU and GPU runners) when synced by copy-pr-bot.
15+
pull_request:
16+
paths:
17+
- ".github/workflows/runner-trust-probe.yml"
18+
- "ci/tools/runner_trust_probe.sh"
19+
- "ci/tools/runner_trust_probe.ps1"
20+
push:
21+
branches:
22+
- "pull-request/[0-9]+"
23+
paths:
24+
- ".github/workflows/runner-trust-probe.yml"
25+
- "ci/tools/runner_trust_probe.sh"
26+
- "ci/tools/runner_trust_probe.ps1"
1127
schedule:
1228
# Weekly on Mondays at 06:23 UTC
1329
- cron: "23 6 * * 1"
@@ -49,7 +65,11 @@ jobs:
4965
- name: Compute runner labels
5066
id: compute
5167
env:
52-
LABEL_FILTER: ${{ inputs.label-filter || '' }}
68+
# On fork pull_request events self-hosted runners do not pick up jobs;
69+
# limit pull_request runs to GitHub-hosted labels, while push to
70+
# pull-request/[0-9]+ (copy-pr-bot) and schedule/workflow_dispatch
71+
# probe the full fleet.
72+
LABEL_FILTER: ${{ inputs.label-filter || (github.event_name == 'pull_request' && '^(ubuntu-latest|windows-latest|windows-2022|windows-11-arm)$') || '' }}
5373
run: |
5474
matrix_json="$(yq -o json '.' ci/test-matrix.yml)"
5575

‎ci/tools/tests/test_runner_trust_probe.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def test_runner_trust_probe_workflow_structure() -> None:
5151
if True in workflow:
5252
workflow["on"] = workflow.pop(True)
5353

54-
assert set(workflow["on"]) == {"schedule", "workflow_dispatch"}
54+
assert {"schedule", "workflow_dispatch"} <= set(workflow["on"])
55+
assert set(workflow["on"]) <= {"schedule", "workflow_dispatch", "pull_request", "push"}
5556
assert workflow["permissions"] == {"contents": "read"}
5657
assert set(workflow["jobs"]) == {
5758
"compute-matrix",

0 commit comments

Comments
 (0)