fix(ci): trigger orca on per-job result, not needs.*.result spread
CI / nodejs-build (push) Has been skipped
CI / test-go (push) Has been skipped
CI / detect-changes (push) Successful in 9s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / secret-scan (push) Has been skipped
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / validate-canonical-controls (push) Successful in 14s
CI / loc-budget (push) Successful in 17s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / iace-gt-coverage (push) Has been skipped
CI / test-python-backend (push) Has been skipped
CI / test-python-document-crawler (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped

Gitea act_runner evaluates contains(needs.*.result, 'success') to false
when most upstream build jobs are skipped, so single-service changes
never fired the orca redeploy.

Gate trigger-orca on explicit needs.build-<service>.result == 'success'
OR across all 8 build jobs. One green build now suffices to deploy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-05-19 09:34:59 +02:00
parent b87c27d104
commit 936c354547
+17 -7
View File
@@ -313,10 +313,13 @@ jobs:
git push --force "$PUSH_URL" "refs/tags/last-build/main"
echo "Tag last-build/main now at ${SHA}"
# ── orca redeploy — runs only if at least one build succeeded ─────────────
# `always()` lets this run when some builds are skipped (unchanged services).
# The contains() checks ensure we only redeploy when something actually built
# and no build failed.
# ── orca redeploy — runs if at least one build was triggered AND green ────
# Per-job `result == 'success'` is true only when the job actually ran and
# passed; skipped/failed/cancelled jobs return their own status string and
# fail the OR. This avoids Gitea's quirky evaluation of `contains(needs.*
# .result, 'success')` when most upstreams are skipped (root cause of
# trigger-orca being skipped on single-service changes).
# `always()` is required so the job is evaluated when upstreams skip.
trigger-orca:
runs-on: docker
@@ -332,9 +335,16 @@ jobs:
- build-dsms-node
if: |
always() &&
contains(needs.*.result, 'success') &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')
(
needs.build-admin-compliance.result == 'success' ||
needs.build-backend-compliance.result == 'success' ||
needs.build-ai-sdk.result == 'success' ||
needs.build-developer-portal.result == 'success' ||
needs.build-tts.result == 'success' ||
needs.build-document-crawler.result == 'success' ||
needs.build-dsms-gateway.result == 'success' ||
needs.build-dsms-node.result == 'success'
)
steps:
- name: Checkout (for SHA)
run: |