release: parse the Gitea repository id with JSON instead of sed (avoid nested id ambiguity)
This commit is contained in:
1 parent
1a5e21eab2
commit
1a9f3a4c78
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user