From 1701f02a4a681ae444e7ff24f28849c71211bffa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Jun 2026 09:28:31 +0000 Subject: [PATCH 1/2] ci: restrict push trigger to production branches and add PR concurrency cancellation --- .github/workflows/maven.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c1106575f..8cadbe8c4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -3,9 +3,16 @@ name: Java CI on: workflow_dispatch: push: + branches: + - master + - 2.3.x pull_request: types: [reopened, opened, synchronize] +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: runs-on: ${{ matrix.os }} From 1f571bc9c387944283fa361f254173d238ee6e93 Mon Sep 17 00:00:00 2001 From: Christoph John Date: Mon, 22 Jun 2026 11:34:41 +0200 Subject: [PATCH 2/2] added some explanatory comments --- .github/workflows/maven.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8cadbe8c4..a8a0cf4ea 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,14 +1,17 @@ name: Java CI on: + # Build only the production branches on push, so internal feature branches do not trigger a build twice (once on push, once on the pull request). workflow_dispatch: push: branches: + # Restricts push builds to these branches, even if the workflow is copied to another branch. - master - 2.3.x pull_request: types: [reopened, opened, synchronize] +# Check all pushes to production branches, but interrupt a PR job if a new commit is pushed. concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }}