Skip to content

fix(ci): prevent duplicate CI runs on main branch pushes#20

Merged
ajitgunturi merged 2 commits into
mainfrom
fix/ci-workflow-triggers
Mar 20, 2026
Merged

fix(ci): prevent duplicate CI runs on main branch pushes#20
ajitgunturi merged 2 commits into
mainfrom
fix/ci-workflow-triggers

Conversation

@ajitgunturi
Copy link
Copy Markdown
Collaborator

@ajitgunturi ajitgunturi commented Mar 20, 2026

Summary

  • CI workflow now uses branches-ignore: [main] instead of branches: [main] for push triggers
  • Eliminates duplicate build-and-test runs on main — the Release workflow already gates on build+test before publishing
  • CI continues to run on PRs targeting main and pushes to feature branches

Test plan

  • Verify CI triggers on a push to a non-main branch
  • Verify CI triggers on a PR targeting main
  • Verify CI does not trigger on a push to main
  • Verify Release workflow still triggers on main pushes

🤖 Generated with Claude Code

ajitgunturi and others added 2 commits March 20, 2026 19:29
CI now runs on PRs targeting main and pushes to non-main branches.
Release workflow already covers build+test on main pushes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pushing to a branch with an open PR triggered CI twice — once via
push and once via pull_request. CI only needs the PR trigger;
Release handles main pushes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b0c4fe978

ℹ️ 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".

Comment thread .github/workflows/ci.yml Outdated
on:
push:
branches: [main]
branches-ignore: [main]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep PR updates from firing CI twice

Changing push to branches-ignore: [main] means every same-repo topic branch now triggers this workflow on push, while the existing pull_request trigger still runs for PRs targeting main. In the normal flow here, once feature/foo has an open PR, each new commit will enqueue two identical build-and-test runs instead of one. Before this change only the pull_request run fired, so this actually introduces duplicate CI usage for active PRs rather than removing it.

Useful? React with 👍 / 👎.

@ajitgunturi ajitgunturi merged commit ecd9673 into main Mar 20, 2026
2 checks passed
@ajitgunturi ajitgunturi deleted the fix/ci-workflow-triggers branch March 20, 2026 14:05
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