From 7be3fb4a93947b597d45ad4f28b5d729ea4998d2 Mon Sep 17 00:00:00 2001 From: Bakhomious Basta Date: Wed, 28 Oct 2026 08:51:23 +0100 Subject: [PATCH] ci: read the registry host from a Gitea variable GITHUB_SERVER_URL is the runner's in-cluster address (http://gitea-http.gitea.svc:3000) on the homelab runner, so the image name kept http:// and every push failed with 'invalid reference format' since ffcf4e3. The organisation variable REGISTRY holds the host and keeps the tailnet's name out of the repo. --- .gitea/workflows/image.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/image.yaml b/.gitea/workflows/image.yaml index 03b70f3..3bdcf13 100644 --- a/.gitea/workflows/image.yaml +++ b/.gitea/workflows/image.yaml @@ -23,6 +23,10 @@ jobs: timeout-minutes: 15 env: BUILDKIT_HOST: tcp://buildkitd.buildkit.svc:1234 + # The registry's host, an organisation variable in Gitea, keeps the tailnet's name out of + # this public repo. GITHUB_SERVER_URL is the runner's in-cluster address, not the host. + REGISTRY: ${{ vars.REGISTRY }} + IMAGE: ${{ vars.REGISTRY }}/codedogapp/nudge # renovate: datasource=github-releases depName=moby/buildkit BUILDKIT_VERSION: v0.34.1 steps: @@ -30,11 +34,6 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - name: Name the registry - run: | - # Gitea's own address, so that the tailnet's name stays out of this public repo. - echo "REGISTRY=${GITHUB_SERVER_URL#https://}" >> "$GITHUB_ENV" - echo "IMAGE=${GITHUB_SERVER_URL#https://}/codedogapp/nudge" >> "$GITHUB_ENV" - name: Install buildctl run: | curl -fsSL "https://github.com/moby/buildkit/releases/download/$BUILDKIT_VERSION/buildkit-$BUILDKIT_VERSION.linux-amd64.tar.gz" \