Skip to content

Commit 40c3b74

Browse files
committed
update conditions
1 parent 667acef commit 40c3b74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/pr-deploy.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
# Run deploy job only if build job was successful or skipped
233233
if: |
234234
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')
236236
runs-on: "ubuntu-latest"
237237
env:
238238
CODER_IMAGE_TAG: ${{ needs.get_info.outputs.CODER_IMAGE_TAG }}
@@ -267,9 +267,6 @@ jobs:
267267
-H "Content-Type:application/json" \
268268
--data '{"type":"CNAME","name":"*.${{ env.PR_HOSTNAME }}","content":"${{ env.PR_HOSTNAME }}","ttl":1,"proxied":false}'
269269
270-
- name: Checkout
271-
uses: actions/checkout@v3
272-
273270
- name: Create PR namespace
274271
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
275272
run: |
@@ -278,6 +275,10 @@ jobs:
278275
kubectl delete namespace "pr${{ env.PR_NUMBER }}" || true
279276
kubectl create namespace "pr${{ env.PR_NUMBER }}"
280277
278+
- name: Checkout
279+
if: github.event_name == 'workflow_dispatch' || needs.get_info.outputs.BUILD == 'true'
280+
uses: actions/checkout@v3
281+
281282
- name: Check and Create Certificate
282283
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
283284
run: |
@@ -332,6 +333,7 @@ jobs:
332333
envsubst < ./.github/pr-deployments/values.yaml > ./pr-deploy-values.yaml
333334
334335
- name: Install/Upgrade Helm chart
336+
if: github.event_name == 'workflow_dispatch' || needs.get_info.outputs.BUILD == 'true'
335337
run: |
336338
set -euo pipefail
337339
if [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
@@ -345,8 +347,6 @@ jobs:
345347
--namespace "pr${{ env.PR_NUMBER }}" \
346348
--reuse-values \
347349
--force
348-
else
349-
echo "Skipping helm upgrade, as there is no new image to deploy"
350350
fi
351351
fi
352352

0 commit comments

Comments
 (0)