Skip to content

Restrict trigger push branch for GitHub Workflow#16367

Open
apupier wants to merge 1 commit into
apache:3.3from
apupier:restrictTriggerForPushOnGithubWorkflow
Open

Restrict trigger push branch for GitHub Workflow#16367
apupier wants to merge 1 commit into
apache:3.3from
apupier:restrictTriggerForPushOnGithubWorkflow

Conversation

@apupier

@apupier apupier commented Jun 30, 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

What is the purpose of the change?

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

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>
@codecov-commenter

codecov-commenter commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.84%. Comparing base (ed0e11e) to head (01e2c5a).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16367      +/-   ##
============================================
- Coverage     60.86%   60.84%   -0.03%     
- Complexity    11768    11772       +4     
============================================
  Files          1953     1953              
  Lines         89260    89260              
  Branches      13471    13471              
============================================
- Hits          54329    54307      -22     
- Misses        29350    29360      +10     
- Partials       5581     5593      +12     
Flag Coverage Δ
integration-tests-java21 32.13% <ø> (+0.04%) ⬆️
integration-tests-java8 32.22% <ø> (+0.01%) ⬆️
samples-tests-java21 32.15% <ø> (+<0.01%) ⬆️
samples-tests-java8 29.83% <ø> (+<0.01%) ⬆️
unit-tests-java11 59.07% <ø> (-0.02%) ⬇️
unit-tests-java17 58.56% <ø> (-0.02%) ⬇️
unit-tests-java21 58.59% <ø> (+0.03%) ⬆️
unit-tests-java25 58.54% <ø> (+<0.01%) ⬆️
unit-tests-java8 59.08% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants