Fix build-release.sh Gitea URL for host-side uploads

GITEA_URL points to the internal Docker hostname (gitea-changemaker:3000),
which is unreachable from the host. Derive external URL from GITEA_REGISTRY
instead, which already contains the external hostname.

Bunker Admin
This commit is contained in:
bunker-admin 2026-03-23 14:07:36 -06:00
parent e0fd4fd7b7
commit 44931260c4

View File

@ -199,7 +199,9 @@ success "Created: $TARBALL (${TARBALL_SIZE})"
if [[ "$UPLOAD" == "true" ]]; then
source "$PROJECT_DIR/.env" 2>/dev/null || true
GITEA_TOKEN="${GITEA_API_TOKEN:-}"
GITEA_HOST="${GITEA_URL:-https://gitea.bnkops.com}"
# GITEA_URL is the internal Docker hostname — use GITEA_REGISTRY for external access
GITEA_REGISTRY_HOST="${GITEA_REGISTRY%%/*}" # strip /admin path → gitea.bnkops.com
GITEA_HOST="${GITEA_EXTERNAL_URL:-https://${GITEA_REGISTRY_HOST:-gitea.bnkops.com}}"
if [[ -z "$GITEA_TOKEN" ]]; then
warn "GITEA_API_TOKEN not set — skipping upload"