mh
This commit is contained in:
parent
46cf10b319
commit
4e0a0b0643
@ -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
|
Loading…
x
Reference in New Issue
Block a user