diff --git a/action.yaml b/action.yaml index 5d566f2..006b6d7 100644 --- a/action.yaml +++ b/action.yaml @@ -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