@@ -232,7 +232,7 @@ jobs:
232
232
# Run deploy job only if build job was successful or skipped
233
233
if : |
234
234
always() && (needs.build.result == 'success' || needs.build.result == 'skipped') &&
235
- (github.event_name == 'workflow_dispatch' || needs.get_info.outputs.NEW == 'false' || github.event.inputs.deploy == 'true' )
235
+ (github.event_name == 'workflow_dispatch' || needs.get_info.outputs.NEW == 'false')
236
236
runs-on : " ubuntu-latest"
237
237
env :
238
238
CODER_IMAGE_TAG : ${{ needs.get_info.outputs.CODER_IMAGE_TAG }}
@@ -267,9 +267,6 @@ jobs:
267
267
-H "Content-Type:application/json" \
268
268
--data '{"type":"CNAME","name":"*.${{ env.PR_HOSTNAME }}","content":"${{ env.PR_HOSTNAME }}","ttl":1,"proxied":false}'
269
269
270
- - name : Checkout
271
- uses : actions/checkout@v3
272
-
273
270
- name : Create PR namespace
274
271
if : needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
275
272
run : |
@@ -278,6 +275,10 @@ jobs:
278
275
kubectl delete namespace "pr${{ env.PR_NUMBER }}" || true
279
276
kubectl create namespace "pr${{ env.PR_NUMBER }}"
280
277
278
+ - name : Checkout
279
+ if : github.event_name == 'workflow_dispatch' || needs.get_info.outputs.BUILD == 'true'
280
+ uses : actions/checkout@v3
281
+
281
282
- name : Check and Create Certificate
282
283
if : needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
283
284
run : |
@@ -332,6 +333,7 @@ jobs:
332
333
envsubst < ./.github/pr-deployments/values.yaml > ./pr-deploy-values.yaml
333
334
334
335
- name : Install/Upgrade Helm chart
336
+ if : github.event_name == 'workflow_dispatch' || needs.get_info.outputs.BUILD == 'true'
335
337
run : |
336
338
set -euo pipefail
337
339
if [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
@@ -345,8 +347,6 @@ jobs:
345
347
--namespace "pr${{ env.PR_NUMBER }}" \
346
348
--reuse-values \
347
349
--force
348
- else
349
- echo "Skipping helm upgrade, as there is no new image to deploy"
350
350
fi
351
351
fi
352
352
0 commit comments