return tag
This commit is contained in:
@@ -2,7 +2,7 @@ name: Update Release
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
tag:
|
||||
required: true
|
||||
type: string
|
||||
milestoneName:
|
||||
@@ -35,17 +35,17 @@ jobs:
|
||||
|
||||
# Fetch Release
|
||||
release=$(curl -s -H "Authorization: token $API_TOKEN" \
|
||||
"$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/tags/${{ inputs.version }}")
|
||||
"$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/tags/${{ inputs.tag }}")
|
||||
|
||||
# Extract the ID of the Release
|
||||
release_id=$(echo $release | jq -r '.id')
|
||||
|
||||
if [ "$release_id" == "null" ]; then
|
||||
echo "No release for tag '${{ inputs.version }}' found. Exiting."
|
||||
echo "No release for tag '${{ inputs.tag }}' found. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Found tag '${{ inputs.version }}' release with ID: $release_id"
|
||||
echo "Found tag '${{ inputs.tag }}' release with ID: $release_id"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user