This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git
The following commit(s) were added to refs/heads/master by this push:
new 6418ae385 Restrict trigger push branch for GitHub Workflow (#328)
6418ae385 is described below
commit 6418ae3852c3a4512d7166603c44f36e196a9226
Author: Aurélien Pupier <[email protected]>
AuthorDate: Thu Jul 2 09:50:56 2026 +0200
Restrict trigger push branch for GitHub Workflow (#328)
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/coverage.yml | 2 ++
.github/workflows/maven.yml | 2 ++
.github/workflows/maven_legacy.yml | 2 ++
3 files changed, 6 insertions(+)
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index fff1719e9..f818bfe48 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -20,6 +20,8 @@ on:
workflow_dispatch:
# Don't trigger if other workfiles change
push:
+ branches:
+ - master
paths-ignore:
- '**/workflows/*.yml'
- '!**/workflows/coverage.yml'
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index e14eeac64..c341f91b8 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -20,6 +20,8 @@ on:
workflow_dispatch:
# Don't trigger if other workfiles change
push:
+ branches:
+ - master
paths-ignore:
- '**/workflows/*.yml'
- '!**/workflows/maven.yml'
diff --git a/.github/workflows/maven_legacy.yml
b/.github/workflows/maven_legacy.yml
index 59e4e7817..5d83296cc 100644
--- a/.github/workflows/maven_legacy.yml
+++ b/.github/workflows/maven_legacy.yml
@@ -20,6 +20,8 @@ on:
workflow_dispatch:
# self trigger
push:
+ branches:
+ - master
paths:
- '**/workflows/maven_legacy.yml'
- 'commons-math-legacy/**'