ci: merge deploy into ci.yaml to fix orphaned-job race
Neuron Soul CI / build (push) Successful in 7m30s
Neuron Soul CI / deploy (push) Failing after 6m54s

Both ci.yaml and deploy-gke.yaml triggered on push/main and shared the
neuron-runner concurrency group. Gitea's cancel-in-progress:false protects
running jobs but not queued ones — a new push arriving while a build was
in progress cancelled the queued deploy job from the previous push, leaving
the soul permanently at 0/0 replicas on GKE.

Fix: add deploy as a needs:build job in ci.yaml so build+deploy are a single
workflow instance. One push queues one instance — no more orphaned deploys.
deploy-gke.yaml is demoted to workflow_dispatch-only for manual slot overrides.
This commit is contained in:
2026-06-28 15:05:07 -05:00
parent 20d279598a
commit fd6df322f6
2 changed files with 228 additions and 13 deletions
+7 -11
View File
@@ -1,16 +1,13 @@
name: Deploy Soul to GKE
name: Deploy Soul to GKE (manual)
# Triggers on push to main — after the soul binary is built and published
# by ci.yaml, this workflow builds the Docker image and blue-green deploys
# to the neuron-prod namespace on GKE.
# MANUAL OVERRIDE ONLY — push-triggered deploys now run as the 'deploy' job
# in ci.yaml (needs: build), which eliminates the two-workflow concurrency
# race that was cancelling queued deploy runs.
#
# This workflow runs AFTER ci.yaml has published the neuron-soul generic
# artifact to Artifact Registry. The Docker build downloads that binary.
# Use this workflow only when you need to deploy a specific slot manually
# (e.g. rollback, force a slot override) without triggering a full CI build.
on:
push:
branches:
- main
workflow_dispatch:
inputs:
slot:
@@ -18,8 +15,7 @@ on:
required: false
default: "green"
# Serialize all builds on this runner — concurrent jobs exhaust the Docker daemon.
# A queued deploy runs after the in-progress build finishes.
# Manual deploys still share the runner serialization group.
concurrency:
group: neuron-runner
cancel-in-progress: false