Skip to content

Commit

Permalink
If statement + quote json
Browse files Browse the repository at this point in the history
  • Loading branch information
carlssonk committed Sep 24, 2024
1 parent 8269642 commit 7eb65d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7eb65d2

Please sign in to comment.