This is an automated email from the ASF dual-hosted git repository.
EarthChen pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 316df8e576 Restrict trigger push branch for GitHub Workflow (#16367)
316df8e576 is described below
commit 316df8e57677cc8c1ed6d92bd40ca0daba27393f
Author: Aurélien Pupier <[email protected]>
AuthorDate: Mon Jul 6 08:11:53 2026 +0200
Restrict trigger push branch for GitHub Workflow (#16367)
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 <[email protected]>
---
.github/workflows/build-and-test-pr.yml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/build-and-test-pr.yml
b/.github/workflows/build-and-test-pr.yml
index 36d8e9a542..9513956f15 100644
--- a/.github/workflows/build-and-test-pr.yml
+++ b/.github/workflows/build-and-test-pr.yml
@@ -1,6 +1,12 @@
name: "Build and Test For PR"
-on: [push, pull_request, workflow_dispatch]
+on:
+ push:
+ branches:
+ - 3.3
+ - 3.2
+ pull_request:
+ workflow_dispatch:
permissions:
contents: read