From b0ba1b7f006a27da4d3655cec3e05690ec515505 Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Fri, 19 Jun 2026 20:33:36 +0300 Subject: [PATCH] ci: prevent concurrency cancellation on rapid main merges The concurrency group used github.ref which is static for main (refs/heads/main). When multiple PRs merged rapidly (~2 min apart), each merge commit cancelled the previous CI run before it could finish. Fix: use github.sha for push events to main (unique per commit) while keeping the ref-based group for PR branches (cancels on new commits to the same PR branch). Co-authored-by: ronia --- .github/workflows/android.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 8d2bf9c9..33920b08 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -11,9 +11,11 @@ on: branches: [main] workflow_dispatch: -# Cancel in-progress runs on the same ref when a new commit lands. +# Cancel in-progress runs when a new commit lands on the same PR branch. +# On main (push events), each commit gets a unique group so rapid merges +# don't cancel each other's CI runs. concurrency: - group: ci-${{ github.ref }} + group: ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} cancel-in-progress: true jobs: