ci: fix Renovate auth failure by pointing it at the in-cluster Forgejo endpoint #4
No reviewers
Labels
No labels
dependencies
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
alex/pi-shared!4
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/renovate-auth-endpoint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause of the "Authentication failure"
The Renovate run (#5/#6) aborted with:
I pulled the run logs and traced it to the network topology, not the token. The action runner lives on an internal IPv4 podman network (
10.89.0.x) with no IPv6 egress, whileforge.l3x.inresolves to an IPv6-only address:So
RENOVATE_ENDPOINT: ${{ vars.MY_FORGEJO_PUBLIC_URL }}/api/v1/(=https://forge.l3x.in/api/v1/) was unreachable from the runner - Renovate couldn't contact its platform API at all. (actions/checkoutand the Pi agent already work because they talk to the internalhttp://forgejo:3000; the public URL is only used for display links.)Fix
.forgejo/workflows/renovate.ymlRENOVATE_ENDPOINTat the reachable in-cluster servicehttp://forgejo:3000/api/v1/instead of the public, unreachable URL.RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN || github.token }}- prefer a dedicated PAT if set, otherwise fall back to the always-available per-jobgithub.token, which already authenticates against the in-cluster API (verified:login: forgejo-actions). This makes it work with zero secret setup.permissions:block (contents/pull-requests/issues: write) so the built-in token can push branches and open PRs/the dependency dashboard.renovate.json"gitUrl": "endpoint"so git clone/push is derived from the (internal) endpoint rather than the repo's reportedclone_url(which is the unreachable publichttps://forge.l3x.in/...git).Verification
Confirmed against the actual Renovate 43.246.1 source (
getRepoUrl/initPlatformin the installed package) and from inside the runner:curl /api/v1/userwithgithub.tokenviahttp://forgejo:3000permissions.pushonalex/pi-shared(job token)git ls-remote http://<token>@forgejo:3000/alex/pi-shared.git(the exact URLgitUrl: endpointproduces)c9b4affHEADtrimTrailingApiPath-> API calls resolve tohttp://forgejo:3000/api/v1/...Note: the
.github/removal requested in #1 was already done ind9c054d; this PR addresses the follow-up auth error.Refs #1