Restore main branch filter on push trigger to avoid duplicate CI runs - #1106
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1639a14824
ℹ️ 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".
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} |
There was a problem hiding this comment.
Restore the push branch filter
For an in-repository branch with an open PR against main or version-*, each commit still triggers both push and pull_request runs because on.push remains unfiltered. This concurrency key cannot cancel the duplicate: github.ref is the branch ref for the push run but the PR merge ref for the pull-request run, so they belong to different groups. Add the intended branches: ["main"] filter under push.
Useful? React with 👍 / 👎.
Merging this PR will not alter performance
Comparing Footnotes
|
|
Docs preview: https://7835116a-httpx2-docs.pydantic.workers.dev |
The Python 3.15 support PR (#1090) accidentally dropped
branches: ["main"]from thepushtrigger inmain.yml, so every push to a PR branch triggered both apushrun and apull_requestrun, duplicating CI.This restores the branch filter, and adds a
concurrencyblock to the PR-triggered workflows so superseded runs get cancelled when new commits are pushed.Replaces #1105, which was branched off the wrong base.