Skip to content

fix(ci): add pull_request trigger and gate GPU jobs for security#7

Closed
ivanbasov wants to merge 1 commit into
NVIDIA:mainfrom
ivanbasov:fix/ci-required-status-checks
Closed

fix(ci): add pull_request trigger and gate GPU jobs for security#7
ivanbasov wants to merge 1 commit into
NVIDIA:mainfrom
ivanbasov:fix/ci-required-status-checks

Conversation

@ivanbasov
Copy link
Copy Markdown
Member

@ivanbasov ivanbasov commented Mar 5, 2026

Summary

  • Add pull_request trigger so fork PRs get immediate CPU CI feedback without needing a maintainer to push to pull-request/N
  • Gate GPU jobs (gpu-tests, smoke-test-gpu) with if: github.event_name == 'push' to prevent untrusted fork code from running on self-hosted NVIDIA runners

Required admin action: fix ruleset check names

The "Main and Releases" branch ruleset (id 13507673) requires StatusContext entries named CI / <job> (push), but GitHub Actions creates CheckRun entries with plain names (unit-tests, gpu-tests, etc.). These don't match, leaving PRs stuck with "11 expected" checks that are never satisfied.

An admin needs to update the ruleset at Settings > Rules > Main and Releases to change the required status check contexts:

Old (StatusContext) New (CheckRun)
CI / unit-tests (push) unit-tests
CI / unit-tests-coverage (push) unit-tests-coverage
CI / spdx-header-check (push) spdx-header-check
CI / gpu-tests (push) gpu-tests
CI / smoke-test-gpu (push) smoke-test-gpu
CI / compat / py3.11 / inference (push) compat / py3.11 / inference
CI / compat / py3.11 / train (push) compat / py3.11 / train
CI / compat / py3.12 / inference (push) compat / py3.12 / inference
CI / compat / py3.12 / train (push) compat / py3.12 / train
CI / compat / py3.13 / inference (push) compat / py3.13 / inference
CI / compat / py3.13 / train (push) compat / py3.13 / train

Or via API (requires admin):

gh api repos/NVIDIA/quantum-predecoder/rulesets/13507673 -X PUT --input ruleset.json

Changed files

File Change
.github/workflows/ci.yml Add pull_request trigger, gate GPU jobs to push/merge_group only

Test plan

  • pull_request from fork triggers CPU jobs only (GPU jobs show as skipped)
  • push to pull-request/N triggers all jobs including GPU
  • After admin updates ruleset, CheckRun entries satisfy required checks (11 clean checks, no duplicates)

- Add `pull_request` trigger so fork PRs get immediate CPU CI
  feedback without needing a push to `pull-request/N`.
- Gate GPU jobs with `if: github.event_name == 'push'` to prevent
  untrusted fork code from executing on self-hosted runners.

Note: the branch ruleset still requires StatusContext entries named
"CI / <job> (push)" which are not automatically created by GitHub
Actions. An admin needs to update ruleset 13507673 to use CheckRun
names (e.g., "unit-tests" instead of "CI / unit-tests (push)").

Made-with: Cursor
@ivanbasov ivanbasov force-pushed the fix/ci-required-status-checks branch from 1ccf306 to 015195c Compare March 5, 2026 20:04
@ivanbasov ivanbasov changed the title fix(ci): add status reporting and pull_request trigger fix(ci): add pull_request trigger and gate GPU jobs for security Mar 5, 2026
@ivanbasov ivanbasov closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant