This is an automated email from the ASF dual-hosted git repository.

casionone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/master by this push:
     new 211d1a2191 Restrict trigger push branch for GitHub Workflow (#5454)
211d1a2191 is described below

commit 211d1a2191d1bd8992290e5bd7df6937690c93c0
Author: AurĂ©lien Pupier <[email protected]>
AuthorDate: Thu Jul 9 07:09:25 2026 +0200

    Restrict trigger push branch for GitHub Workflow (#5454)
    
    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-backend.yml       | 7 ++++++-
 .github/workflows/build-frontend.yml      | 7 ++++++-
 .github/workflows/check-code-format.yml   | 7 ++++++-
 .github/workflows/check-license.yml       | 7 ++++++-
 .github/workflows/check-sql-pg-script.yml | 7 ++++++-
 .github/workflows/check-sql-script.yml    | 7 ++++++-
 .github/workflows/dead-link-checker.yaml  | 7 ++++++-
 7 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/build-backend.yml 
b/.github/workflows/build-backend.yml
index 6c9270d2db..a109a53960 100644
--- a/.github/workflows/build-backend.yml
+++ b/.github/workflows/build-backend.yml
@@ -17,7 +17,12 @@
 
 name: Build Backend
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release-*
+  pull_request:
 
 env:
   MAVEN_OPTS: -Dmaven.resolver.transport=wagon 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -Xmx16g -XX:MetaspaceSize=4g 
-XX:ReservedCodeCacheSize=2g
diff --git a/.github/workflows/build-frontend.yml 
b/.github/workflows/build-frontend.yml
index 4828a00ab7..736eef55a1 100644
--- a/.github/workflows/build-frontend.yml
+++ b/.github/workflows/build-frontend.yml
@@ -17,7 +17,12 @@
 
 name: Build Frontend
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release-*
+  pull_request:
 
 
 jobs:
diff --git a/.github/workflows/check-code-format.yml 
b/.github/workflows/check-code-format.yml
index d894814288..a5bdd79caa 100644
--- a/.github/workflows/check-code-format.yml
+++ b/.github/workflows/check-code-format.yml
@@ -17,7 +17,12 @@
 
 name: Code Format Check
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release-*
+  pull_request:
 
 jobs:
   spotless-check:
diff --git a/.github/workflows/check-license.yml 
b/.github/workflows/check-license.yml
index b68c524661..b1c18e67e5 100644
--- a/.github/workflows/check-license.yml
+++ b/.github/workflows/check-license.yml
@@ -17,7 +17,12 @@
 
 name: License Check
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release-*
+  pull_request:
 
 jobs:
   apache-rat-check:
diff --git a/.github/workflows/check-sql-pg-script.yml 
b/.github/workflows/check-sql-pg-script.yml
index ed7d84d7a1..22559d96c3 100644
--- a/.github/workflows/check-sql-pg-script.yml
+++ b/.github/workflows/check-sql-pg-script.yml
@@ -17,7 +17,12 @@
 
 name: Postgresql Script Check
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release-*
+  pull_request:
 
 jobs:
   sql-check:
diff --git a/.github/workflows/check-sql-script.yml 
b/.github/workflows/check-sql-script.yml
index 43caa03cf9..9c8e6fdf48 100644
--- a/.github/workflows/check-sql-script.yml
+++ b/.github/workflows/check-sql-script.yml
@@ -17,7 +17,12 @@
 
 name: Sql Script Check
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release-*
+  pull_request:
 
 jobs:
   sql-check:
diff --git a/.github/workflows/dead-link-checker.yaml 
b/.github/workflows/dead-link-checker.yaml
index 5ca665b835..1793f7e435 100644
--- a/.github/workflows/dead-link-checker.yaml
+++ b/.github/workflows/dead-link-checker.yaml
@@ -18,7 +18,12 @@
 
 name: Dead Link Check
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release-*
+  pull_request:
 
 jobs:
   dead-links-check:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to