You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2026/07/03 06:46:15 UTC

(httpcomponents-core) branch master updated: Restrict trigger push branch for GitHub Workflow

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

ok2c pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


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

commit fcdb53070b8d497b616db9f6aa1afb3b463f801e
Author: Aurélien Pupier <ap...@ibm.com>
AuthorDate: Thu Jul 2 10:21:41 2026 +0200

    Restrict trigger push branch for GitHub Workflow
    
    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 <ap...@ibm.com>
---
 .github/workflows/maven.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index f40f1e8b0..7b05b7603 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -15,7 +15,12 @@
 
 name: Java CI
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - 5.4.x
+  pull_request:
 
 permissions:
   contents: read