Skip to content

chore(ci): Restrict trigger push branch for GitHub Workflow#13641

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

chore(ci): Restrict trigger push branch for GitHub Workflow#13641
apupier wants to merge 1 commit into
apache:masterfrom
apupier:configureTriggerPushForGitHubActions

Conversation

@apupier

@apupier apupier commented Jul 1, 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

Description

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. github_actions Pull requests that update GitHub Actions code labels Jul 1, 2026
@apupier apupier force-pushed the configureTriggerPushForGitHubActions branch from 93d048d to 3d72916 Compare July 1, 2026 13:33
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 force-pushed the configureTriggerPushForGitHubActions branch from 3d72916 to a7444ce Compare July 1, 2026 13:34
@apupier apupier changed the title Restrict trigger push branch for GitHub Workflow hore(ci) Restrict trigger push branch for GitHub Workflow Jul 1, 2026
@apupier apupier changed the title hore(ci) Restrict trigger push branch for GitHub Workflow chore(ci) Restrict trigger push branch for GitHub Workflow Jul 1, 2026
@apupier apupier changed the title chore(ci) Restrict trigger push branch for GitHub Workflow chore(ci): Restrict trigger push branch for GitHub Workflow Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant