Clone from public URL, not GITHUB_SERVER_URL (resolves to localhost in runner)
Some checks failed
Mirror to GitHub / mirror (push) Successful in 4s
Build and publish package / package (push) Failing after 2m0s

The Forgejo runner injects GITHUB_SERVER_URL as http://localhost:3002, which
is unreachable from inside the job container. Use the public URL instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-13 16:14:13 +08:00
parent 6b14032d3e
commit 746e03a5a8
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ jobs:
- name: Mirror to GitHub
run: |
set -euo pipefail
git clone --mirror "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" repo.git
git clone --mirror "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" repo.git
cd repo.git
# Mirror only branches and tags (not refs/pull/*, which GitHub rejects);
# --prune deletes GitHub refs that no longer exist on Forgejo.