diff --git a/.github/workflows/actions/deploy_v2/action.yml b/.github/workflows/actions/deploy_v2/action.yml index 42ccc4702..dde0ecf9b 100644 --- a/.github/workflows/actions/deploy_v2/action.yml +++ b/.github/workflows/actions/deploy_v2/action.yml @@ -22,14 +22,14 @@ runs: run: | tf_vars_file=terraform/aks/config/${{ inputs.environment }}.tfvars.json terraform_version=$(awk '/{/{f=/^terraform/;next}f' terraform/aks/provider.tf | grep -o [0-9\.]*) - echo "cluster=$(jq -r '.cluster' ${tf_vars_file})" >> $GITHUB_ENV - echo "aks_app_environment=$(jq -r '.environment' ${tf_vars_file})" >> $GITHUB_ENV + cluster=$(jq -r '.cluster' ${tf_vars_file}) + aks_app_environment=$(jq -r '.environment' ${tf_vars_file}) echo "TERRAFORM_VERSION=$terraform_version" >> $GITHUB_ENV - echo "namespace=$(jq -r '.namespace' ${tf_vars_file})" >> $GITHUB_ENV + if [[ $cluster == 'production' ]]; then - app_hostname=getintoteachingapi-${{ env.aks_app_environment }}.teacherservices.cloud" + app_hostname=getintoteachingapi-${aks_app_environment}.teacherservices.cloud else - app_hostname=getintoteachingapi-${{ env.aks_app_environment }}.${cluster}.teacherservices.cloud" + app_hostname=getintoteachingapi-${aks_app_environment}.${cluster}.teacherservices.cloud fi echo "app_hostname=${app_hostname}" >> $GITHUB_OUTPUT echo "app_hostname=${app_hostname}"