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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5f258a38b7
commit
234622549c
@@ -55,12 +55,15 @@ jobs:
|
|||||||
# the uploads 404 — that broke the first v0.1.0 release run.
|
# 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)
|
ID=$(echo "$REL" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
||||||
for f in dist/*; do
|
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")" \
|
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
|
done
|
||||||
|
|
||||||
image:
|
image:
|
||||||
runs-on: ubuntu-latest
|
# Dedicated docker-capable repo runner ("compilesau-echolot").
|
||||||
|
runs-on: echolot
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -69,9 +72,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "version=${GITHUB_REF_NAME#server-}" >> "$GITHUB_OUTPUT"
|
echo "version=${GITHUB_REF_NAME#server-}" >> "$GITHUB_OUTPUT"
|
||||||
# GITHUB_SERVER_URL inside the runner is the INTERNAL url
|
# GITHUB_SERVER_URL inside the runner is the INTERNAL url
|
||||||
# (http://app:3000) — strip any scheme, and prefer the public host
|
# (http://app:3000); the registry needs the public host so pulled
|
||||||
# for the registry so pulled image references work outside.
|
# image references work outside. Env var overrides if it changes.
|
||||||
HOST="${ECHOLOT_REGISTRY_HOST:-${GITHUB_SERVER_URL#*://}}"
|
HOST="${ECHOLOT_REGISTRY_HOST:-git.rambossek.at}"
|
||||||
echo "host=$HOST" >> "$GITHUB_OUTPUT"
|
echo "host=$HOST" >> "$GITHUB_OUTPUT"
|
||||||
echo "image=$HOST/${GITHUB_REPOSITORY,,}-server" >> "$GITHUB_OUTPUT"
|
echo "image=$HOST/${GITHUB_REPOSITORY,,}-server" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user