Release API через внутренний сервис кластера вместо Traefik
All checks were successful
Release / release (push) Successful in 6m39s

Загрузка AppImage (~129 МБ) через публичный адрес обрывалась
readTimeout Traefik (60 с): unexpected EOF -> 500/502.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vodyanoy 2026-11-17 20:36:51 +07:00
parent 4d14ecdb0e
commit 598bd61c77

View file

@ -19,6 +19,11 @@ jobs:
container:
image: electronuserland/builder:wine
env:
# API напрямую через сервис кластера: в обход Traefik (readTimeout 60 с
# обрывал загрузку AppImage) и hairpin-NAT через публичный IP
API: http://forgejo.forgejo.svc.cluster.local:3000/api/v1/repos/vodyanoy/aero-mail
steps:
- name: Checkout (full history for tags)
uses: actions/checkout@v4
@ -106,7 +111,7 @@ jobs:
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
-d "${PAYLOAD}" \
"https://git.vodyanoysh.ru/api/v1/repos/vodyanoy/aero-mail/releases")
"${API}/releases")
RELEASE_ID=$(printf '%s' "$RELEASE" | node -e 'let input = ""; process.stdin.on("data", chunk => { input += chunk }); process.stdin.on("end", () => { const release = JSON.parse(input); if (!Number.isSafeInteger(release.id)) throw new Error("Некорректный ID релиза"); process.stdout.write(String(release.id)) })')
printf '%s' "${RELEASE_ID}" > /tmp/release-id.txt
@ -121,7 +126,7 @@ jobs:
printf '%s' "${RELEASE_ID}" | grep -qxE '[0-9]+' || { echo "Некорректный ID релиза: $(printf '%s' "${RELEASE_ID}" | od -c)"; exit 1; }
for ASSET_PATH in "dist/aero-mail-${VERSION}.AppImage" "dist/aero-mail-${VERSION}-win-x64.exe" "dist/aero-mail-${VERSION}-win-x64.exe.blockmap" dist/latest.yml; do
ASSET_NAME=$(basename "${ASSET_PATH}")
URL="https://git.vodyanoysh.ru/api/v1/repos/vodyanoy/aero-mail/releases/${RELEASE_ID}/assets?name=${ASSET_NAME}"
URL="${API}/releases/${RELEASE_ID}/assets?name=${ASSET_NAME}"
curl --globoff --fail-with-body --silent --show-error -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/octet-stream" \