diff --git a/.gitea/workflows/checkForTag.yaml b/.gitea/workflows/checkForTag.yaml index e4fd817..897e8e0 100644 --- a/.gitea/workflows/checkForTag.yaml +++ b/.gitea/workflows/checkForTag.yaml @@ -18,14 +18,14 @@ jobs: OWNER="greyhound" API_TOKEN=${{ vars.PAT_TOKEN }} - tag=$(curl -s -H "Authorization: token $API_TOKEN" \ - "$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/tags/${{ inputs.tag }}") + tag=$(curl -s -H "Authorization: token $API_TOKEN" "$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/tags/${{ inputs.tag }}") echo "Tag details: $tag" - if echo "$tag" | jq -e '.name' > /dev/null; then + if echo "$tag" | jq -e '.error' > /dev/null; then + echo "This Tag not exists" + exit 0 + else echo "This Tag allready exists" exit 1 - else - exit 0 fi \ No newline at end of file