fix: finaly gitea runners can works

This commit is contained in:
2026-09-02 13:51:11 +00:00
parent 07689e1a9e
commit fd6c9536e7
10 changed files with 36 additions and 23 deletions
+4 -1
View File
@@ -3,9 +3,12 @@
# Requires: GCR_GITEA_URL, GITEA_REGISTRATION_TOKEN_FILE, GITEA_ADMIN_TOKEN_FILE
gcr_gitea_registration_token() {
repo="$1"
token="$(gcr_gitea_admin_token)" || return 1
owner="${repo%%/*}"
name="${repo#*/}"
curl -fsS -X POST -H "Authorization: token $token" \
"$GCR_GITEA_URL/api/v1/orgs/hectic-lab/actions/runners/registration-token" \
"$GCR_GITEA_URL/api/v1/repos/$owner/$name/actions/runners/registration-token" \
| jq -r '.token'
}