From 035466bd88c22ac2f6f857a9664fc2de0ee079aa Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Fri, 27 Jun 2025 12:35:24 +0300 Subject: [PATCH] Fix reusable_workflow_tag.yaml (#2512) Signed-off-by: Avgustin Marinov --- .github/workflows/reusable_workflow_tag.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable_workflow_tag.yaml b/.github/workflows/reusable_workflow_tag.yaml index dc41131bf..fd60ac40f 100644 --- a/.github/workflows/reusable_workflow_tag.yaml +++ b/.github/workflows/reusable_workflow_tag.yaml @@ -32,15 +32,6 @@ jobs: git config --local user.email "github-actions[bot]@users.noreply.github.com" if git rev-parse "${TAG_NAME}" >/dev/null 2>&1; then - echo "Creating a tag ${TAG_NAME} ..." - if [ -n "${TAG_MESSAGE}" ]; then - git tag -a ${TAG_NAME} -m "${TAG_MESSAGE}" - else - git tag -a ${TAG_NAME} - fi - git push origin ${TAG_NAME} - echo "Tag ${TAG_NAME} created." - else if [ "${{ inputs.override_tag }}" == "true" ]; then echo "Tag ${TAG_NAME} already exists, but override is set to true, so moving it ..." git tag -d ${TAG_NAME} @@ -54,6 +45,15 @@ jobs: else echo "Tag ${TAG_NAME} already exists, do nothing." fi + else + echo "Creating a tag ${TAG_NAME} ..." + if [ -n "${TAG_MESSAGE}" ]; then + git tag -a ${TAG_NAME} -m "${TAG_MESSAGE}" + else + git tag -a ${TAG_NAME} + fi + git push origin ${TAG_NAME} + echo "Tag ${TAG_NAME} created." fi env: TAG_NAME: ${{ inputs.tag_name }}