From 9c28c6b4fcfccce24216dd5b93977c10fa853088 Mon Sep 17 00:00:00 2001 From: Saqib Date: Tue, 15 Sep 2026 14:25:26 +0530 Subject: [PATCH] fix: run prod finalize/rollback in production-ops, without a second approval production requires a reviewer, and every job referencing it asked again: approve the deploy, then approve finalize or rollback -- so a failing prod deploy stayed live until someone clicked. production-ops holds the same host and SSH secrets with no reviewer and a main-only branch policy; the human approval stays on the deploy job. --- .github/workflows/deploy-backend.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-backend.yml b/.github/workflows/deploy-backend.yml index 31c3d61..74353a5 100644 --- a/.github/workflows/deploy-backend.yml +++ b/.github/workflows/deploy-backend.yml @@ -331,7 +331,9 @@ jobs: ${{ !cancelled() && needs.deploy.result == 'success' && (needs.smoke-tests.result == 'failure' || needs.functional-tests.result == 'failure') }} runs-on: ubuntu-latest - environment: ${{ github.ref_name == 'main' && 'production' || 'development' }} + # production-ops: same prod host/SSH secrets, no required reviewer, main-only. + # The human approval is on the deploy job; finalize/rollback must not wait. + environment: ${{ github.ref_name == 'main' && 'production-ops' || 'development' }} # 50m: must comfortably exceed the Restore previous image step's own # 40m command_timeout (see the Deploy job's equivalent step for why). timeout-minutes: 50 @@ -386,7 +388,9 @@ jobs: needs.smoke-tests.result == 'success' && (needs.functional-tests.result == 'success' || needs.functional-tests.result == 'skipped') }} runs-on: ubuntu-latest - environment: ${{ github.ref_name == 'main' && 'production' || 'development' }} + # production-ops: same prod host/SSH secrets, no required reviewer, main-only. + # The human approval is on the deploy job; finalize/rollback must not wait. + environment: ${{ github.ref_name == 'main' && 'production-ops' || 'development' }} timeout-minutes: 10 steps: - name: Checkout code