diag: surface GITEA_API/REPO and pack-body bytes in release step to isolate 500
This commit is contained in:
1 parent
d0612c6aac
commit
e9bd85ea09
1 file changed
+8
@@ -257,10 +257,18 @@ jobs:
|
||||
: "${GITEA_REPO:?GITEA_REPO not set}"
|
||||
T="${TOKEN:-${GITEA_TOKEN}}"
|
||||
[ -n "$T" ] || { echo "No token available"; exit 1; }
|
||||
# Diagnostics: surface exactly what the runner resolves.
|
||||
echo "GITEA_API=[${GITEA_API}]"
|
||||
echo "GITEA_REPO=[${GITEA_REPO}]"
|
||||
echo "pack-body.md bytes: $(wc -c < /tmp/pack-body.md 2>/dev/null || echo MISSING)"
|
||||
echo "pack-body.md last bytes (xxd):"; tail -c 40 /tmp/pack-body.md 2>/dev/null | xxd | tail -3
|
||||
BODY="$(jq -Rs '.' < /tmp/pack-body.md)"
|
||||
PAYLOAD="$(jq -n --arg tag "${PACK_VERSION}" --arg name "${PACK_VERSION}" --arg body "$BODY" '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')"
|
||||
echo "PAYLOAD bytes: ${#PAYLOAD}"
|
||||
echo "PAYLOAD head:"; echo "$PAYLOAD" | head -c 200; echo
|
||||
echo "Creating release via ${GITEA_API}/repos/${GITEA_REPO}/releases"
|
||||
HTTP="$(curl -s -w '%{http_code}' -o /tmp/pack-rel.json \
|
||||
--retry 3 --retry-delay 3 \
|
||||
-X POST "${GITEA_API}/repos/${GITEA_REPO}/releases" \
|
||||
-H "Authorization: token ${T}" -H "Content-Type: application/json" -d "$PAYLOAD" || echo 000)"
|
||||
echo "Create release HTTP: ${HTTP}"
|
||||
|
||||
Reference in new issue
Block a user