File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,8 @@ jobs:
154154
155155
156156 deploy-staging :
157- if : ${{inputs.environment == 'staging'}}
157+ # Always run staging deployment first when production is requested
158+ if : ${{inputs.environment == 'staging' || inputs.environment == 'production'}}
158159 uses : ./.github/workflows/staging_deploy.yml
159160 needs : setup
160161 with :
@@ -175,9 +176,10 @@ jobs:
175176 gcp_credentials : ${{ secrets.gcp_credentials }}
176177
177178 deploy-production :
178- if : ${{inputs.environment == 'production'}}
179+ # Only run production if staging succeeded
180+ if : ${{inputs.environment == 'production' && needs.deploy-staging.result == 'success'}}
179181 uses : ./.github/workflows/production_deploy.yml
180- needs : setup
182+ needs : [ setup, deploy-staging]
181183 with :
182184 evaluation_function_name : ${{ needs.setup.outputs.evaluation_function_name }}
183185 template-repository-name : ${{ inputs.template-repository-name }}
You can’t perform that action at this time.
0 commit comments