From 84bf9b7fba2b530735814ad5d68cf4167aaeab94 Mon Sep 17 00:00:00 2001 From: DevOps Date: Tue, 9 Jun 2026 21:20:54 +0200 Subject: [PATCH] fix(ci): correct swagger path + add deploy concurrency guard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Iteration 2 fix: /api/swagger → /swagger (correct ASP.NET default). Iteration 3 — Concurrency guard: - concurrency group 'deploy-production': ensures only one deploy runs at a time (cancel-in-progress: false so queued deploys wait instead of being cancelled). - Why: prevents race conditions when CI-triggered workflow_run and manual workflow_dispatch overlap. Without this, parallel deploys could corrupt docker compose state or conflict on shared resources (ports, volumes, version tags). --- .gitea/workflows/deploy.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 0c3e81b..a48f825 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,6 +1,13 @@ name: Deploy to Production run-name: 🚀 Deploy ${{ inputs.bump_version || 'patch' }} by @${{ gitea.actor }} +# ── Concurrency: one deploy at a time, cancel queued ones ── +# Why: prevents race conditions when CI triggers deploy while +# a manual deploy is still running. The latest deploy wins. +concurrency: + group: deploy-production + cancel-in-progress: false + # ─────────────────────────────────────────────────── # Trigger: automatic after CI success, or manual dispatch. # Runner: uses ubuntu-latest label (consistently present on @@ -203,9 +210,9 @@ jobs: fi } - check "/dashboard" "Dashboard" 200 - check "/health" "Health API" 200 - check "/api/swagger" "API Swagger" 200 + check "/dashboard" "Dashboard" 200 + check "/health" "Health API" 200 + check "/swagger" "API Swagger" 200 echo "" echo "Results: $PASS passed, $FAIL failed"