From 51d8281abba38073661833ee8f0d064a71af312f Mon Sep 17 00:00:00 2001 From: m5r Date: Sat, 8 Aug 2026 21:14:37 +0200 Subject: [PATCH] release: name the image by the public registry host, not the internal server url --- .gitea/workflows/release.yml | 7 +++++++ tools/release.zig | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index eefc8c5..5fe58dc 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -52,6 +52,13 @@ concurrency: cancel-in-progress: false env: + # The public registry host, which names the image. Inside the cluster + # GITHUB_SERVER_URL is http://gitea:3000: docker refuses to log in to a + # plain-http registry, and an image named gitea:3000/... is unpullable from + # anywhere that matters. The manifest probe still uses the internal URL — + # same registry, cheaper route. Found by dry-run attempt 4. + REGISTRY_HOST: "git.mial.net" + ZIG_VERSION: "0.16.0" # Exact patch, not a floating "24" (ruling 12). NODE_VERSION: "24.19.0" diff --git a/tools/release.zig b/tools/release.zig index a06d89b..b1428bf 100644 --- a/tools/release.zig +++ b/tools/release.zig @@ -1361,7 +1361,18 @@ fn resolve(ctx: *Ctx) !void { }; const server = std.mem.trimEnd(u8, ctx.require("GITHUB_SERVER_URL"), "/"); - const registry = registryHost(server); + // The registry host names the image, so it must be the PUBLIC host: inside + // the cluster GITHUB_SERVER_URL is http://gitea:3000, and an image called + // gitea:3000/... is unpullable outside and unloggable-into by docker, + // which refuses plain http. The workflow pins REGISTRY_HOST explicitly; + // the derivation below is the fallback for a deployment whose server URL + // is already public. The manifest probe stays on GITHUB_SERVER_URL — same + // registry, internal route, no TLS dependency in this tool. + const registry = reg: { + const explicit = ctx.get("REGISTRY_HOST"); + if (explicit.len != 0) break :reg explicit; + break :reg registryHost(server); + }; const repository = lowercase(ctx.arena, ctx.require("GITHUB_REPOSITORY")); const image_name = ctx.fmt("{s}/{s}", .{ registry, repository });