This is an automated email from the ASF dual-hosted git repository.
yesamer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie.git
The following commit(s) were added to refs/heads/main by this push:
new c1bd4314900 [NO-ISSUE] Stop a merged PR's closed run from canceling
the push run on main (#7084)
c1bd4314900 is described below
commit c1bd43149007cf92336013e1ed1a6ab7ef736494
Author: Tiago Bento <[email protected]>
AuthorDate: Mon Sep 7 03:33:10 2026 -0400
[NO-ISSUE] Stop a merged PR's closed run from canceling the push run on
main (#7084)
CI :: Build, CI :: CI Tests and Dev :: Tests subscribe to the pull_request
`closed` event so that closing a PR cancels its in-progress run. On the
closed event of a merged PR, github.ref is the base branch, so with a
concurrency group keyed on github.ref that run shares a group with the push
run for the merge commit, and GitHub cancels whichever of the two it queued
first. Recent merges to main show exactly that: push runs canceled within
seconds with no steps executed.
Pull request runs are now grouped by PR number, pushes to main keep the ref
as their key, and the two test workflows cancel only pull request runs, as
CI :: Build already did.
---
.github/workflows/ci-tests.yaml | 4 ++--
.github/workflows/ci.yaml | 2 +-
.github/workflows/dev-tests.yaml | 4 ++--
docs/PR_CHECKS_AND_CI.md | 5 +++--
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml
index fd52124e7eb..1ece7b500ce 100644
--- a/.github/workflows/ci-tests.yaml
+++ b/.github/workflows/ci-tests.yaml
@@ -29,8 +29,8 @@ on:
branches: [main]
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ci-compute-build-scopes:
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index b014760b6a3..2e58cbdf855 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -35,7 +35,7 @@ on:
branches: [main]
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
diff --git a/.github/workflows/dev-tests.yaml b/.github/workflows/dev-tests.yaml
index 356ed203011..3c2d157dc96 100644
--- a/.github/workflows/dev-tests.yaml
+++ b/.github/workflows/dev-tests.yaml
@@ -34,8 +34,8 @@ on:
branches: [main]
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
dev-tests:
diff --git a/docs/PR_CHECKS_AND_CI.md b/docs/PR_CHECKS_AND_CI.md
index a290ca90dd0..3a6d350f332 100644
--- a/docs/PR_CHECKS_AND_CI.md
+++ b/docs/PR_CHECKS_AND_CI.md
@@ -66,8 +66,9 @@ Notes:
on non-Linux runners.
- The `apache.snapshots` Maven repository is blocked via a mirror in
`settings.xml`, so builds cannot silently depend on snapshot artifacts.
-- A new push to a PR cancels that PR's in-progress run; runs for pushes to
- `main` are never canceled.
+- A new push to a PR cancels that PR's in-progress run, and so does closing
+ or merging the PR. Runs for pushes to `main` are never canceled.
+ `CI :: CI Tests` and `Dev :: Tests` follow the same rules.
- After the build, a Surefire report step fails the job on test failures, and
the build logs (`build.log`) plus the reproducibility outputs
(`*.buildcompare`, `*.buildinfo`) are uploaded as workflow artifacts.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]