release: parse the Gitea repository id with JSON instead of sed (avoid nested id ambiguity)
ci/woodpecker/push/main Pipeline was successful
ci/woodpecker/tag/main Pipeline was successful
ci/woodpecker/manual/contract Pipeline was successful

This commit is contained in:
marqdo-prove committed 2026-11-26 12:54:01 +08:00
1 parent 1a5e21eab2
commit 1a9f3a4c78
1 file changed
+1 -1
+1 -1
View File
@@ -80,7 +80,7 @@ git_push HEAD:refs/heads/master
git_push "refs/tags/$tag:refs/tags/$tag"
gitea_id=$(timeout 30 curl -sS -H "Authorization: token $MARQDO_GIT_TOKEN" "$gitea_api" |
sed -n 's/.*"id":\([0-9]\+\).*/\1/p' | head -1)
python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])' 2>/dev/null || true)
if [ -z "$gitea_id" ]; then
echo "warning: could not read the Gitea repository id; skipping Woodpecker activation" >&2
else