Skip to content

Commit 384ff98

Browse files
committed
do not redeploy if there is no new build
1 parent f9b6635 commit 384ff98

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/pr-deploy.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ jobs:
359359
value: "coder"
360360
EOF
361361
362-
- name: Install Helm chart
362+
- name: Install/Upgrade Helm chart
363363
run: |
364364
set -euxo pipefail
365365
if [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
@@ -368,10 +368,14 @@ jobs:
368368
--values ./pr-deploy-values.yaml \
369369
--force
370370
else
371-
helm upgrade --install "pr${{ env.PR_NUMBER }}" ./helm \
372-
--namespace "pr${{ env.PR_NUMBER }}" \
373-
--reuse-values \
374-
--force
371+
if [[ ${{ needs.get_info.outputs.BUILD }} ]]
372+
helm upgrade --install "pr${{ env.PR_NUMBER }}" ./helm \
373+
--namespace "pr${{ env.PR_NUMBER }}" \
374+
--reuse-values \
375+
--force
376+
else
377+
echo "Skipping helm upgrade, as there is no new image to deploy"
378+
375379
fi
376380
377381
- name: Install coder-logstream-kube

0 commit comments

Comments
 (0)