You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pk...@apache.org on 2026/03/30 17:16:12 UTC

(commons-release-plugin) branch fix/workflows-push created (now d6a9a33)

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

pkarwasz pushed a change to branch fix/workflows-push
in repository https://gitbox.apache.org/repos/asf/commons-release-plugin.git


      at d6a9a33  Run build only on `master` and PRs

This branch includes the following new commits:

     new d6a9a33  Run build only on `master` and PRs

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(commons-release-plugin) 01/01: Run build only on `master` and PRs

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch fix/workflows-push
in repository https://gitbox.apache.org/repos/asf/commons-release-plugin.git

commit d6a9a3339efd528df892dbbdf1063d1410f45a13
Author: Piotr P. Karwasz <pk...@apache.org>
AuthorDate: Mon Mar 30 19:15:59 2026 +0200

    Run build only on `master` and PRs
    
    When a PR is created from a branch in the same repository, workflows run twice: once on `push` and once on `pull_request`.
    
    This change fixes it, by only running workflows:
    
    - On a direct push to `master`,
    - On a Pull Request, regardless of the origin.
---
 .github/workflows/maven.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 2b3e739..eb275f5 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -15,7 +15,11 @@
 
 name: Java CI
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - "master"
+  pull_request: {}
 
 permissions:
   contents: read