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 }}")
|
||||
|
||||
echo "Tag details: $tag"
|
||||
|
||||
if [ "$tag" = "404 page not found" ]; then
|
||||
echo "Tag not found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Tag details: $tag"
|
||||
|
||||
if echo "$tag" | jq -e '.error' > /dev/null; then
|
||||
echo "This Tag not exists"
|
||||
exit 0
|
||||
else
|
||||
echo "This Tag allready exists"
|
||||
if echo "$tag" | jq -e '.name' != 'null'; then
|
||||
echo "This Tag already exists"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "This Tag not exists"
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user