From 7eb65d28ee4142bd3ff7ee938f278e3ab705d586 Mon Sep 17 00:00:00 2001 From: carlssonk Date: Tue, 24 Sep 2024 05:43:05 +0200 Subject: [PATCH] If statement + quote json --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9777b94..f51bc81 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -160,7 +160,7 @@ jobs: run: | terraform show -json | sed -n "2p" > terraform_show.json echo "$(cat terraform_show.json)" - echo "terraform_state_json=$(cat terraform_show.json)" >> $GITHUB_OUTPUT + echo "terraform_state_json='$(cat terraform_show.json)'" >> $GITHUB_OUTPUT working-directory: ${{ env.TF_ROOT_DIRECTORY }} - name: Delay for 15 seconds @@ -185,7 +185,7 @@ jobs: COMMIT_HASH=$(git rev-parse --short HEAD) TAG_NAME="${COMMIT_HASH}" - if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then + if git ls-remote --exit-code --tags origin "refs/tags/$TAG_NAME" >/dev/null 2>&1; then echo "Tag $TAG_NAME already exists. Skipping tag creation." else git tag $TAG_NAME