release: use public Gitea URL for user-facing artefact links
`github.server_url` on Gitea Actions resolves to the runner's internal Gitea endpoint (e.g. http://gitea:3000) — fine for API calls the runner makes itself, broken for URLs end-user machines have to resolve. Both v0.1.0 user-facing places used it: - latest.json's `url` and `zsync` fields (read by AppImageUpdate on user machines). - The AppImage's embedded `--update-info` ELF section (also read by AppImageUpdate to find the appcast). Result: v0.1.0's latest.json shipped pointing at gitea:3000, which no end-user machine can reach. Fix: add a job-level `PUBLIC_REPO_URL` env var (single source of truth, easy to change if Gitea ever moves) and use it for both artefact-URL composition sites. The release-create + asset-upload API calls keep using `github.server_url`/`api/v1` — those are runner→Gitea internal traffic where the internal URL is correct. Note: v0.1.0's already-uploaded latest.json still has the broken URLs. Either leave it (no auto-update consumers yet) or PATCH the asset out of band; future tags will be correct once this lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,15 @@ jobs:
|
||||
name: Linux AppImage
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
# Public-facing repo URL for assets users will download.
|
||||
# `github.server_url` resolves to the runner's internal Gitea
|
||||
# endpoint (e.g. http://gitea:3000), which works for API calls
|
||||
# the runner makes itself but not for URLs baked into latest.json
|
||||
# or the AppImage's embedded --update-info — those are read by
|
||||
# end-user machines that can only reach Gitea via its public URL.
|
||||
PUBLIC_REPO_URL: 'https://src.bundespruefstelle.ch/magdev/php-qml'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -64,7 +73,7 @@ jobs:
|
||||
# AppImageUpdate sidecar will fetch this .zsync URL; it must
|
||||
# point at the asset we're about to upload to this Release.
|
||||
APPIMAGE_UPDATE_INFO: |
|
||||
zsync|${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/Todo-x86_64.AppImage.zsync
|
||||
zsync|${{ env.PUBLIC_REPO_URL }}/releases/download/${{ github.ref_name }}/Todo-x86_64.AppImage.zsync
|
||||
run: make appimage
|
||||
|
||||
- name: Install zsync + Xvfb
|
||||
@@ -103,7 +112,7 @@ jobs:
|
||||
run: |
|
||||
SIZE=$(stat -c %s Todo-x86_64.AppImage)
|
||||
SHA=$(sha256sum Todo-x86_64.AppImage | awk '{print $1}')
|
||||
URL_BASE="${{ github.server_url }}/${{ github.repository }}/releases/download/${TAG}"
|
||||
URL_BASE="${PUBLIC_REPO_URL}/releases/download/${TAG}"
|
||||
jq -n \
|
||||
--arg version "$TAG" \
|
||||
--arg url "$URL_BASE/Todo-x86_64.AppImage" \
|
||||
|
||||
Reference in New Issue
Block a user