fix: grep pipefail 版本 fix 更新
Node.js Build / build (push) Has been skipped

This commit is contained in:
windychen
2026-07-21 00:16:35 +08:00
parent 9223f3c5ff
commit 85b3e075ce
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ jobs:
run: |
npm config set //gitea:3000/api/packages/windychen/npm/:_authToken ${{ secrets.NPM_GITEA_TOKEN }}
VERSION=$(node -p "require('./package.json').version")
EXISTS=$(curl -s "http://gitea:3000/api/v1/packages/windychen?q=windychen-utils" -H "Authorization: token ${{ secrets.NPM_GITEA_TOKEN }}" | grep -c "\"version\":\"$VERSION\"")
EXISTS=$(curl -s "http://gitea:3000/api/v1/packages/windychen?q=windychen-utils" -H "Authorization: token ${{ secrets.NPM_GITEA_TOKEN }}" | grep -c "\"version\":\"$VERSION\"" || true)
if [ "$EXISTS" -gt 0 ]; then
echo "Gitea: version $VERSION already exists, skipping."
echo "Gitea|skipped|版本 ${VERSION} 已存在" >> /tmp/publish_result.txt