From 234622549cdf3e3dbccf17fa69ed0b2548245b07 Mon Sep 17 00:00:00 2001 From: mrambossek Date: Thu, 30 Jul 2026 16:29:27 +0200 Subject: [PATCH] ci: image job on the dedicated 'echolot' runner; public registry host default compilesau-echolot (repo runner, label echolot) handles the docker image build. Registry host defaults to git.rambossek.at (runner-internal GITHUB_SERVER_URL is http://app:3000). Asset re-uploads on tag re-runs warn instead of failing the completed release. Co-Authored-By: Claude Opus 5 --- .gitea/workflows/build-server.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build-server.yml b/.gitea/workflows/build-server.yml index 4dfeeef..5007012 100644 --- a/.gitea/workflows/build-server.yml +++ b/.gitea/workflows/build-server.yml @@ -55,12 +55,15 @@ jobs: # the uploads 404 — that broke the first v0.1.0 release run. ID=$(echo "$REL" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) for f in dist/*; do + # Tolerate re-runs: an existing asset of the same name may 4xx. curl -sf -X POST "$API/releases/$ID/assets?name=$(basename "$f")" \ - -H "Authorization: token $TOKEN" -F "attachment=@$f" + -H "Authorization: token $TOKEN" -F "attachment=@$f" \ + || echo "::warning::upload of $(basename "$f") failed (already attached?)" done image: - runs-on: ubuntu-latest + # Dedicated docker-capable repo runner ("compilesau-echolot"). + runs-on: echolot steps: - uses: actions/checkout@v4 @@ -69,9 +72,9 @@ jobs: run: | echo "version=${GITHUB_REF_NAME#server-}" >> "$GITHUB_OUTPUT" # GITHUB_SERVER_URL inside the runner is the INTERNAL url - # (http://app:3000) — strip any scheme, and prefer the public host - # for the registry so pulled image references work outside. - HOST="${ECHOLOT_REGISTRY_HOST:-${GITHUB_SERVER_URL#*://}}" + # (http://app:3000); the registry needs the public host so pulled + # image references work outside. Env var overrides if it changes. + HOST="${ECHOLOT_REGISTRY_HOST:-git.rambossek.at}" echo "host=$HOST" >> "$GITHUB_OUTPUT" echo "image=$HOST/${GITHUB_REPOSITORY,,}-server" >> "$GITHUB_OUTPUT"