ci: Hardcode internal Gitea URL for checkout with auth
Some checks failed
Build .deb Package / build-and-package (push) Failing after 1s
Some checks failed
Build .deb Package / build-and-package (push) Failing after 1s
- GITHUB_SERVER_URL may point to unreachable external domain - Use http://192.168.2.189:3000 directly with GITHUB_TOKEN for auth - Private repos require token-in-URL authentication
This commit is contained in:
@ -23,11 +23,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
run: |
|
run: |
|
||||||
# Use GITHUB_TOKEN for authenticated clone
|
# Use internal Gitea URL with GITHUB_TOKEN for auth
|
||||||
GIT_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
# GITHUB_SERVER_URL may point to unreachable external domain
|
||||||
# Inject token into URL for private repos
|
git clone "http://echo:${GITHUB_TOKEN}@192.168.2.189:3000/${GITHUB_REPOSITORY}.git" .
|
||||||
AUTH_URL="${GIT_URL/http:\/\//http://echo:${GITHUB_TOKEN}@}"
|
|
||||||
git clone "${AUTH_URL}" .
|
|
||||||
git checkout "$GITHUB_SHA"
|
git checkout "$GITHUB_SHA"
|
||||||
|
|
||||||
- name: Ensure Rust toolchain
|
- name: Ensure Rust toolchain
|
||||||
|
|||||||
Reference in New Issue
Block a user