From 3e41afb12617fc15dc19a319f043efdba8f2378a Mon Sep 17 00:00:00 2001 From: shane knapp Date: Mon, 26 Aug 2024 16:43:38 -0700 Subject: [PATCH] bash conditionals are confusing --- .github/workflows/deploy-hubs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-hubs.yaml b/.github/workflows/deploy-hubs.yaml index bea73df68..a6fd9269e 100644 --- a/.github/workflows/deploy-hubs.yaml +++ b/.github/workflows/deploy-hubs.yaml @@ -31,7 +31,7 @@ jobs: # If the PR labels "hub-images" or "jupyterhub-deployment" are present, this # means the base hub image has changed, and all hubs (staging or prod) need to # be redeployed. The rest of this job will not run in that case. - if [ -n $GITHUB_PR_LABEL_HUB_IMAGES ] || [ -n $GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT ]; then + if [ -c "${GITHUB_PR_LABEL_HUB_IMAGES}" ] || [ -c "${GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT}" ]; then echo "Base hub image has changed, not deploying individual hubs to staging" else # deploy any hubs that have been labeled for deployment @@ -131,7 +131,7 @@ jobs: # If the PR labels "hub-images" or "jupyterhub-deployment" are present, this # means the base hub image has changed, and all hubs (staging or prod) need to # be redeployed. The rest of this job will not run in that case. - if [ -n $GITHUB_PR_LABEL_HUB_IMAGES ] || [ -n $GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT ]; then + if [ -c "${GITHUB_PR_LABEL_HUB_IMAGES}" ] || [ -c "${GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT}" ]; then echo "Base hub image has changed, not deploying individual hubs to prod" else # deploy any hubs that have been labeled for deployment