Skip to content

RANGER-5659 - Restrict trigger push branch for GitHub Workflow#1038

Open
apupier wants to merge 1 commit into
apache:masterfrom
apupier:restrictTriggerForPushEventOnGitHubWorkflow
Open

RANGER-5659 - Restrict trigger push branch for GitHub Workflow#1038
apupier wants to merge 1 commit into
apache:masterfrom
apupier:restrictTriggerForPushEventOnGitHubWorkflow

Conversation

@apupier

@apupier apupier commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

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

How was this patch tested?

(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
similar hanges applied to several other repositories

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>
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