From a97fe98872ac40f155daca15fca6063aeee7dc5f Mon Sep 17 00:00:00 2001 From: Aman Chaturvedi Date: Tue, 12 Mar 2024 00:26:43 +0530 Subject: [PATCH] TP-39914 | fix --- .github/workflows/codePush.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/codePush.yml b/.github/workflows/codePush.yml index 4b27f4ab..c963bf68 100644 --- a/.github/workflows/codePush.yml +++ b/.github/workflows/codePush.yml @@ -67,7 +67,20 @@ jobs: token: ${{ secrets.MY_REPO_PAT }} submodules: recursive persist-credentials: true + - name: Check if tag exists + id: check_tag + run: | + TAG_NAME="${{ needs.generate.outputs.package_version }}" + TAG_EXISTS=$(git tag -l "$TAG_NAME") + if [ "$TAG_EXISTS" ]; then + echo "Tag $TAG_NAME already exists." + echo "::set-output name=tag_exists::true" + else + echo "Tag $TAG_NAME does not exist." + echo "::set-output name=tag_exists::false" + fi - name: Create Git tag + if: steps.check_tag.outputs.tag_exists == 'false' run: | TAG_NAME="${{ needs.generate.outputs.package_version }}" git config --local user.email "${{ github.actor }}@users.noreply.github.com"