0
0
This commit is contained in:
Marco Maatz 2025-05-16 13:56:13 +02:00
parent 46cf10b319
commit 4e0a0b0643

View File

@ -20,17 +20,18 @@ jobs:
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 [ "$tag" = "404 page not found" ]; then if [ "$tag" = "404 page not found" ]; then
echo "Tag not found" echo "Tag not found"
exit 0 exit 0
fi fi
echo "Tag details: $tag"
if echo "$tag" | jq -e '.error' > /dev/null; then if echo "$tag" | jq -e '.name' != 'null'; then
echo "This Tag not exists" echo "This Tag already exists"
exit 0
else
echo "This Tag allready exists"
exit 1 exit 1
fi fi
echo "This Tag not exists"
exit 0