diff --git a/.github/workflows/deploy-alerting-temporal.yml b/.github/workflows/deploy-alerting-temporal.yml index 86475310c2da..04c1b61153d8 100644 --- a/.github/workflows/deploy-alerting-temporal.yml +++ b/.github/workflows/deploy-alerting-temporal.yml @@ -41,7 +41,7 @@ jobs: - name: Build the image on Cloud Build run: | chmod +x ./k8s/cloud-build.sh - ./k8s/cloud-build.sh alerting/temporal + ./k8s/cloud-build.sh alerting-temporal alerting/temporal - name: Deploy the image on Kubernetes run: | diff --git a/k8s/cloud-build.sh b/k8s/cloud-build.sh index 4d613055183b..91c6b3db5ab2 100755 --- a/k8s/cloud-build.sh +++ b/k8s/cloud-build.sh @@ -1,12 +1,14 @@ #!/bin/sh # first arg : name of image to build +# second arg (optional) : working directory. If not provided, it defaults to "../$1" set -e SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)" +WORKING_DIR="${2:-${SCRIPT_DIR}/../$1}" # Change the current working directory to the directory in which to build the image -cd "${SCRIPT_DIR}/../$1" +cd "$WORKING_DIR" # Check the current working directory echo "Current working directory is $(pwd)"