Skip to content

ci: run only on pull requests targeting main - #26

Merged
tms-anhnguyen1 merged 1 commit into
mainfrom
ci/pr-to-main-only
Oct 28, 2026
Merged

tms-anhnguyen1 merged 1 commit into
mainfrom
ci/pr-to-main-only

Conversation

@tms-anhnguyen1

Copy link
Copy Markdown
Contributor

What

Narrow the CI trigger in .github/workflows/ci.yml:

on:
  pull_request:
    branches: [main]
  • Push to main no longer triggers CI.
  • PRs into branches other than main are skipped.
  • Jobs are unchanged: npm run check on Node 20 and 22, then the dist/ drift check.

Why

Every change reaching main goes through a PR, so the check runs there once instead of again after merge.

Note

With the push trigger gone, nothing re-runs on main after merge. Branch protection on main that requires the check jobs to pass keeps that guarantee.

Push to main no longer triggers CI, and PRs into other branches are
skipped. Every change reaching main still passes through a PR, so the
check runs once there instead of again after merge.
@tms-anhnguyen1
tms-anhnguyen1 merged commit f93f7a5 into main Oct 28, 2026
2 checks passed
@tms-anhnguyen1
tms-anhnguyen1 deleted the ci/pr-to-main-only branch October 28, 2026 06:51
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