1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-07 18:18:20 +00:00

Use env GITEA_RUNNER_REGISTRATION_TOKEN as global runner token (#32946) (#32964)

Backport #32946 by wxiaoguang

Fix #23703

When Gitea starts, it reads GITEA_RUNNER_REGISTRATION_TOKEN
or GITEA_RUNNER_REGISTRATION_TOKEN_FILE to add registration token.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-12-24 00:37:11 +08:00
committed by GitHub
parent 0c581106d2
commit 90bd08ceef
8 changed files with 152 additions and 18 deletions

View File

@@ -463,7 +463,7 @@ func registerRoutes(m *web.Router) {
m.Combo("/{runnerid}").Get(repo_setting.RunnersEdit).
Post(web.Bind(forms.EditRunnerForm{}), repo_setting.RunnersEditPost)
m.Post("/{runnerid}/delete", repo_setting.RunnerDeletePost)
m.Get("/reset_registration_token", repo_setting.ResetRunnerRegistrationToken)
m.Post("/reset_registration_token", repo_setting.ResetRunnerRegistrationToken)
})
}