This commit is contained in:
qxa 2026-04-10 14:04:21 +08:00
parent 5f569c16d0
commit 753829f114
1 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,7 @@ runs:
echo "正在调用API: ${{ inputs.server_url }}/api/v1/repos/${{ gitea.repository }}/releases"
# 获取所有发布版本号
json=''
json=''
json=$(curl -s -H 'Authorization:token ${{ inputs.token }}' ${{ inputs.server_url }}/api/v1/repos/${{ gitea.repository }}/releases)
echo "API响应长度: ${#json}"
echo "API响应前100字符: ${json:0:100}"
@ -50,10 +50,11 @@ runs:
fi
echo "提取到的标签数量: $(echo "$tags" | wc -l)"
echo "前5个标签: $(echo "$tags" | head -5)"
echo "前10个标签: $(echo "$tags" | head -10)"
# 过滤出当前日期的版本
date_tags=$(echo "$tags" | grep "^$current_date")
echo "正在过滤当前日期的标签current_date=$current_date"
date_tags=$(echo "$tags" | grep "^$current_date" 2>/dev/null || echo "")
echo "当前日期的标签: $date_tags"
if [ -n "$date_tags" ]; then