diff --git a/.github/actions/update_tfstate/action.yml b/.github/actions/update_tfstate/action.yml index 4bbdf8ec3..276748546 100644 --- a/.github/actions/update_tfstate/action.yml +++ b/.github/actions/update_tfstate/action.yml @@ -23,7 +23,7 @@ runs: if: always() && inputs.skipDeletion == 'false' shell: bash run: | - if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then + if [[ ! -d constellation-terraform ]] && [[ ! -d constellation-iam-terraform ]]; then echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV" else echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV" @@ -44,13 +44,13 @@ runs: mkdir -p to-zip to_upload="" - if [ -d constellation-terraform ]; then + if [[ -d constellation-terraform ]]; then cp -r constellation-terraform to-zip rm -f to-zip/constellation-terraform/plan.zip rm -rf to-zip/constellation-terraform/.terraform to_upload+="to-zip/constellation-terraform" fi - if [ -d constellation-iam-terraform ]; then + if [[ -d constellation-iam-terraform ]]; then cp -r constellation-iam-terraform to-zip rm -rf to-zip/constellation-iam-terraform/.terraform to_upload+=" to-zip/constellation-iam-terraform"