chore(repo): run validate/windows only on PRs to avoid duplicate CI#1928
chore(repo): run validate/windows only on PRs to avoid duplicate CI#1928shellscape merged 2 commits intomasterfrom
Conversation
…ble runs\n\n- Remove redundant push triggers that caused duplicate runs for internal PR branches\n- Release workflow continues to handle push to master after merge\n\nresolves #1927
There was a problem hiding this comment.
The change cleanly removes duplicate runs by dropping push triggers, but it also eliminates CI on non‑PR branch pushes, which may be undesirable for some workflows. If this trade‑off is intended, consider adding workflow_dispatch to allow manual runs and a top-level concurrency block to cancel in‑progress runs on successive PR updates. No other issues are evident in the modified lines.
Summary of changes
- Removed the
pushtrigger from both.github/workflows/validate.ymland.github/workflows/node-windows.yml, leaving onlypull_requestevents (opened,edited,synchronize). - No changes to jobs, matrices, or steps; only event triggers were modified.
- Intent is to ensure each PR runs CI exactly once and avoid duplicate runs from both
pull_requestandpushon internal branches.
…s as requested\n\n- Allow manual runs via Actions UI on both workflows\n- Keep duplicate-run avoidance by staying PR-only; no concurrency added\n\nRefs #1927, follow-up to PR review by @shellscape
There was a problem hiding this comment.
No issues identified in the modified lines. Removing push resolves duplicate runs for internal PRs, and adding workflow_dispatch preserves manual execution when needed. If future needs require CI on branch pushes, consider reintroducing a limited push trigger or adding concurrency, but neither is necessary for the stated goal.
Summary of changes
- Removed
pushtriggers from.github/workflows/validate.ymland.github/workflows/node-windows.ymlto prevent duplicate CI runs on internal PR branches. - Added
workflow_dispatchto both workflows to allow manual runs from the Actions UI. - Left
pull_requestevent types as[opened, edited, synchronize]; no changes to jobs, matrices, or steps.
This ensures
Validate MonorepoandWindowsworkflows run exactly once for a pull request by removing theirpushtriggers.Rollup Plugin Name:
{repo}This PR contains:
Are tests included?
Breaking Changes?
resolves #1927
Description
The
validate.ymlandnode-windows.ymlworkflows were triggered by bothpull_requestandpush(for all branches exceptmaster). For internal PR branches, this resulted in two runs for the same change: one frompull_requestand one frompushwhen new commits were pushed to the PR branch.Changes:
pushtriggers from both workflows so PRs execute CI once viapull_requestevents (opened,edited,synchronize).release.ymlcontinues to run onpushtomaster, providing post-merge validation and publishing as before.Self-review notes
pushand addingconcurrencyto de-duplicate, or restrictingpushto the default branch. Given the issue goal—“only run once for a pull request”—removingpushis the simplest, most reliable fix. If we want CI on non‑PR branch pushes in the future, we can restore a limitedpush(e.g., tomaster) and/or addconcurrencyas a follow‑up.