ci: Use GITEA_TOKEN fallback for API archive checkout
All checks were successful
Build .deb Package / build-and-package (push) Successful in 2m16s
All checks were successful
Build .deb Package / build-and-package (push) Successful in 2m16s
- GITHUB_TOKEN may not be injected in linux:host mode - Use GITEA_TOKEN from runner environment as fallback - API archive download with Authorization header is proven working - Added GITEA_TOKEN to act-runner systemd service environment
This commit is contained in:
@ -23,9 +23,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
run: |
|
run: |
|
||||||
# Use Gitea API archive download (avoids git auth issues with private repos)
|
# Use Gitea API archive download with token auth
|
||||||
# Token auth works reliably in HTTP headers, not in git URLs
|
# GITHUB_TOKEN may not be injected in linux:host mode; fall back to GITEA_TOKEN
|
||||||
curl -sf -H "Authorization: token ${GITHUB_TOKEN}" \
|
TOKEN="${GITHUB_TOKEN:-$GITEA_TOKEN}"
|
||||||
|
curl -sf -H "Authorization: token ${TOKEN}" \
|
||||||
"http://192.168.2.189:3000/api/v1/repos/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz" \
|
"http://192.168.2.189:3000/api/v1/repos/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz" \
|
||||||
-o repo.tar.gz
|
-o repo.tar.gz
|
||||||
tar xzf repo.tar.gz --strip-components=1
|
tar xzf repo.tar.gz --strip-components=1
|
||||||
|
|||||||
Reference in New Issue
Block a user