From b83cb45ccb754d9f38c733d2027137539cce5c84 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Sun, 12 Jul 2026 23:59:10 +0200 Subject: [PATCH] ci: don't cancel-in-progress for main-branch runs (only pull_request) Two back-to-back merges to main cancelled the first merge's deploy: the second push started a new run in the same concurrency group with cancel-in-progress, killing the first's Deploy Agent mid-build and leaving the agent un-deployed. Make cancellation conditional on the event being a pull_request, so stale PR CI still cancels but main-branch deploys always run to completion. Refs #118. Co-Authored-By: Claude Fable 5 --- .gitea/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fdd8072..4ae9b7a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -29,10 +29,13 @@ env: CARGO_NET_RETRY: "10" CARGO_HTTP_MULTIPLEXING: "false" -# Cancel in-progress runs for the same branch/PR +# Cancel superseded PR runs, but NEVER cancel main-branch runs — those build and +# deploy per-service images, and cancelling one merge's deploy when the next +# merge lands leaves a service un-deployed (as happened between two back-to-back +# merges). So cancel-in-progress only for pull_request events. concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: # --------------------------------------------------------------------------- -- 2.54.0