ci: guard downstream QPK pin writers - #292
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b17335d51e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - "QPK_PIN" | ||
| - "qsl-pins.txt" | ||
| - "constraints.txt" | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Restrict downstream dispatches to main
Now that the main-branch push trigger was removed, the only path to this writer is workflow_dispatch, but the job no longer restricts the selected ref. GitHub's manual-run docs expose a Branch selector / gh workflow run --ref BRANCH (https://docs.github.com/actions/managing-workflow-runs/manually-running-a-workflow), and actions/checkout checks out the event ref by default (https://github.com/actions/checkout#usage); if a maintainer dispatches this from a feature branch or tag, scripts/open_downstream_qpk_pin_prs.py reads that ref's QPK_PIN and opens PRs in every downstream repo for a pin that may never have landed on main. Add a job-level if: github.ref == 'refs/heads/main' or checkout main explicitly before using QSL_REPO_SYNC_TOKEN.
Useful? React with 👍 / 👎.
Summary
workflow_dispatchUpdate QPK PinTests-first proof
Update QPK Pinpush; both workflow paths are exactly ignored; normal source pushes still triggerValidation
actionlintgit diff --checkNo workflow was dispatched or rerun.