From 4d1f389cf13d0c8fc617c4a0029f9e410cee311d Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Tue, 7 Jul 2026 23:22:29 +0200 Subject: [PATCH] ci: skip the test-contour deploy on a no-code change The deploy job gated only on the event/ref, so a docs-only PR into development (where unit/integration/ui/conformance path-skip) still redeployed the test contour for nothing. Gate it on the `changes` job too: deploy only when the Go or UI side changed. `changes` still defaults both true when the diff is uncomputable, and a workflow/deploy edit forces both true, so ambiguous or infra changes still deploy. --- .gitea/workflows/ci.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index f8ac898..c7a2aed 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -316,9 +316,13 @@ jobs: # Auto test-deploy on a PR into development and on the push that merges it. # A PR into master is test-only (this job is skipped); prod deploy is manual. # Gates on `gate` (so a real test failure blocks the deploy) but runs even when - # some test jobs were path-skipped. - needs: [gate] - if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/development') || (github.event_name == 'pull_request' && github.base_ref == 'development') }} + # some test jobs were path-skipped. Skipped entirely when neither the Go nor the + # UI side changed (e.g. a docs-only change): the contour image is unchanged, so + # there is nothing to redeploy. `changes` still defaults both to true when the + # diff is uncomputable, and a workflow/deploy edit forces both true, so an + # ambiguous or infra change still deploys as a safety net. + needs: [changes, gate] + if: ${{ (needs.changes.outputs.go == 'true' || needs.changes.outputs.ui == 'true') && ((github.event_name == 'push' && github.ref == 'refs/heads/development') || (github.event_name == 'pull_request' && github.base_ref == 'development')) }} runs-on: ubuntu-latest defaults: run: -- 2.52.0