Skip to content

chore(repo): run validate/windows only on PRs to avoid duplicate CI#1928

Merged
shellscape merged 2 commits intomasterfrom
ai-1927-charlie-workflows-run-twice
Oct 24, 2025
Merged

chore(repo): run validate/windows only on PRs to avoid duplicate CI#1928
shellscape merged 2 commits intomasterfrom
ai-1927-charlie-workflows-run-twice

Conversation

@charliecreates
Copy link
Contributor

This ensures Validate Monorepo and Windows workflows run exactly once for a pull request by removing their push triggers.

Rollup Plugin Name: {repo}

This PR contains:

  • other (CI/workflows)

Are tests included?

  • no

Breaking Changes?

  • no

resolves #1927

Description

The validate.yml and node-windows.yml workflows were triggered by both pull_request and push (for all branches except master). For internal PR branches, this resulted in two runs for the same change: one from pull_request and one from push when new commits were pushed to the PR branch.

Changes:

  • Remove push triggers from both workflows so PRs execute CI once via pull_request events (opened, edited, synchronize).
  • release.yml continues to run on push to master, providing post-merge validation and publishing as before.
Self-review notes
  • I considered keeping push and adding concurrency to de-duplicate, or restricting push to the default branch. Given the issue goal—“only run once for a pull request”—removing push is the simplest, most reliable fix. If we want CI on non‑PR branch pushes in the future, we can restore a limited push (e.g., to master) and/or add concurrency as a follow‑up.

…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
Copy link
Contributor Author

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 push trigger from both .github/workflows/validate.yml and .github/workflows/node-windows.yml, leaving only pull_request events (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_request and push on internal branches.

@charliecreates charliecreates bot removed the request for review from CharlieHelps October 24, 2025 02:11
…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
@charliecreates charliecreates bot requested a review from CharlieHelps October 24, 2025 02:42
Copy link
Contributor Author

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 push triggers from .github/workflows/validate.yml and .github/workflows/node-windows.yml to prevent duplicate CI runs on internal PR branches.
  • Added workflow_dispatch to both workflows to allow manual runs from the Actions UI.
  • Left pull_request event types as [opened, edited, synchronize]; no changes to jobs, matrices, or steps.

@charliecreates charliecreates bot removed the request for review from CharlieHelps October 24, 2025 02:44
@shellscape shellscape merged commit 46ba661 into master Oct 24, 2025
5 checks passed
@shellscape shellscape deleted the ai-1927-charlie-workflows-run-twice branch October 24, 2025 02:55
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.

charlie: workflows run twice

2 participants