Skip to content

MINOR: Restrict trigger push branch for GitHub Workflow#1204

Open
apupier wants to merge 1 commit into
apache:mainfrom
apupier:restrictTriggerPushForGithubWorkflow
Open

MINOR: Restrict trigger push branch for GitHub Workflow#1204
apupier wants to merge 1 commit into
apache:mainfrom
apupier:restrictTriggerPushForGithubWorkflow

Conversation

@apupier

@apupier apupier commented Jul 3, 2026

Copy link
Copy Markdown

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

What's Changed

Please fill in a description of the changes here.

This contains breaking changes.

Closes #NNN.

Note that I needed to recreate a PR as the previous one was closed #1202 (comment)

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>
@apupier apupier changed the title Restrict trigger push branch for GitHub Workflow MINOR: Restrict trigger push branch for GitHub Workflow Jul 3, 2026
@github-actions

This comment has been minimized.

@jbonofre

jbonofre commented Jul 3, 2026

Copy link
Copy Markdown
Member

Is it not the same as the previous one?

@jbonofre

jbonofre commented Jul 3, 2026

Copy link
Copy Markdown
Member

FYI the previous one has been closed intentionally as not required. Can you elaborate why we would need this one?

@apupier

apupier commented Jul 3, 2026

Copy link
Copy Markdown
Author

Is it not the same as the previous one?

no, this one is ignoring only the dependabot branches as agreed here #1202 (comment) with @kou

@apupier

apupier commented Jul 3, 2026

Copy link
Copy Markdown
Author

FYI the previous one has been closed intentionally as not required. Can you elaborate why we would need this one?

same reason as mentioned here #1202 (comment) after it was closed

@kou kou added the chore PRs that make misc changes. label Jul 3, 2026

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Could you update the PR description based of our PR template?

@github-actions github-actions Bot added this to the 20.0.0 milestone Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change chore PRs that make misc changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants