From d6a9a3339efd528df892dbbdf1063d1410f45a13 Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Mon, 30 Mar 2026 19:15:59 +0200 Subject: [PATCH 1/2] 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 2b3e73974..eb275f5a1 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 From e2f5043555986198ee6e888a67a3b1867be3822b Mon Sep 17 00:00:00 2001 From: "Piotr P. Karwasz" Date: Fri, 3 Apr 2026 12:18:08 +0200 Subject: [PATCH 2/2] fix: replace double with single quotes Replaces `"` with `'` as suggested in the review. --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index eb275f5a1..6b8cd5104 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -18,7 +18,7 @@ name: Java CI on: push: branches: - - "master" + - 'master' pull_request: {} permissions: