Skip to content

Restrict trigger push branch for GitHub Workflow#23278

Merged
comphead merged 1 commit into
apache:mainfrom
apupier:restrictTriggerPushForGitHubWorkflow
Jul 1, 2026
Merged

Restrict trigger push branch for GitHub Workflow#23278
comphead merged 1 commit into
apache:mainfrom
apupier:restrictTriggerPushForGitHubWorkflow

Conversation

@apupier

@apupier apupier commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Feature branches rarely need their own CI runs: the code is already tested when a pull request is opened against a release branch. If the push trigger has no branch restriction and pull_request is also configured, every push to a branch with an open PR runs the workflow twice: once for the push and once for the PR synchronisation.

Always give the push trigger an explicit list of branches: this stops branches created from a release branch from inheriting its workflow runs.

see https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=430408443#GitHubActionsRecommendedPractices-Restrictthepushtriggertospecificbranches

Which issue does this PR close?

  • Closes #.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Feature branches rarely need their own CI runs: the code is already
tested when a pull request is opened against a release branch. If the
push trigger has no branch restriction and pull_request is also
configured, every push to a branch with an open PR runs the workflow
twice: once for the push and once for the PR synchronisation.

Always give the push trigger an explicit list of branches: this stops
branches created from a release branch from inheriting its workflow
runs.

see https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=430408443#GitHubActionsRecommendedPractices-Restrictthepushtriggertospecificbranches

Signed-off-by: Aurélien Pupier <apupier@ibm.com>
@github-actions github-actions Bot added the development-process Related to development process of DataFusion label Jul 1, 2026

@comphead comphead left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @apupier that makes sense, I noticed some times the GH actions checks are triggered twice, one for push, another one for pull_request

@comphead comphead added this pull request to the merge queue Jul 1, 2026
Merged via the queue into apache:main with commit e3fcd58 Jul 1, 2026
35 checks passed
@apupier apupier deleted the restrictTriggerPushForGitHubWorkflow branch July 2, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants