From 5bc69f1689617e74ea6708e9f041be555c7ebd33 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 18 Nov 2026 13:46:43 +0100 Subject: [PATCH 1/2] Cancel a pull request's older CI runs when it gets a new push --- .gitea/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 417e0a8b..b9e28b24 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,6 +1,12 @@ name: CI on: pull_request +# A push to a pull request cancels that pull request's older runs; the merge gate reads only the head commit's status. +# The group is per pull request, so pull requests never cancel each other's runs. +concurrency: + group: ci-pr-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: tests: runs-on: docker-host -- 2.52.0 From a638e1df73b88477ef3755558817e44023453e4b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 18 Nov 2026 13:53:31 +0100 Subject: [PATCH 2/2] Group CI runs by ref, so pushes to different branches never cancel each other --- .gitea/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b9e28b24..01d231fa 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: pull_request # A push to a pull request cancels that pull request's older runs; the merge gate reads only the head commit's status. -# The group is per pull request, so pull requests never cancel each other's runs. +# The group is the ref: refs/pull//head for a pull request, the branch for a push, so no two refs cancel each other's runs. concurrency: - group: ci-pr-${{ github.event.pull_request.number }} + group: ci-${{ github.ref }} cancel-in-progress: true jobs: -- 2.52.0