mirror of
https://github.com/hanzoai/git-runner.git
synced 2026-11-14 02:38:33 +00:00
A runner knows the forge by the address it dials. Inside the cluster that is the service, http://hanzo-git.hanzo.svc, while a `uses:` someone writes names the host the forge publishes, https://git.hanzo.ai. Both are the same forge, so the forge now tells the runner which host it publishes, in the github context it already builds, and a clone naming either one goes out with the forge's own credential. Host-pinning an action at the call site works from that point on: uses: https://git.hanzo.ai/hanzoai/ci/.github/actions/imgver@v1 Where the credential goes is now decided in one function, Config.isInstance, which both the action clone and the reusable-workflow clone ask, and which compares hosts whole: git.hanzo.ai.example.com is a different host, and so is any URL carrying ours in its userinfo or its path. Everything else — every actions/*, docker/*, dtolnay/* on github.com — clones anonymously, exactly as before. instance_test.go walks nineteen foreign hosts and asserts each gets nothing, at the call site a step actually fetches through. Every clone line in every job log now ends in `anonymous` or `authenticated`. Whether a credential went to a host is the one thing about a clone you cannot recover afterwards, and a fleet is read through its logs. Co-Authored-By: Hanzo <[email protected]>