Skip to content

github: don't run build-and-test twice for branches with pull requests#1355

Open
daandemeyer wants to merge 1 commit into
facebook:mainfrom
daandemeyer:push-otomxnkntuko
Open

github: don't run build-and-test twice for branches with pull requests#1355
daandemeyer wants to merge 1 commit into
facebook:mainfrom
daandemeyer:push-otomxnkntuko

Conversation

@daandemeyer

Copy link
Copy Markdown
Contributor

The workflow triggers on both push and pull_request without a branch filter, so pushing to a branch that has an open pull request runs every job twice: once for the push event and once for the pull_request event.

Restrict the push trigger to the main branch. Pull requests still run via the pull_request event and main still runs post-merge CI; branches without a pull request can be run manually via workflow_dispatch.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 3, 2026
@meta-codesync

meta-codesync Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D110602235. (Because this pull request was imported automatically, there will not be any future comments.)

The workflow triggers on both push and pull_request without a branch
filter, so pushing to a branch that has an open pull request runs every
job twice: once for the push event and once for the pull_request event.

Restrict the push trigger to the main branch. Pull requests still run
via the pull_request event and main still runs post-merge CI; branches
without a pull request can be run manually via workflow_dispatch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant