mirror of
https://gitea.com/gitea/act_runner.git
synced 2024-12-27 03:18:22 +01:00
add token support for exec (#247)
allow to pass token from secrets Reviewed-on: https://gitea.com/gitea/act_runner/pulls/247 Reviewed-by: Jason Song <i@wolfogre.com> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Tomasz Duda <tomaszduda23@gmail.com> Co-committed-by: Tomasz Duda <tomaszduda23@gmail.com>
This commit is contained in:
parent
8c14933e70
commit
b0bd503b11
@ -416,6 +416,12 @@ func runExec(ctx context.Context, execArgs *executeArgs) func(cmd *cobra.Command
|
||||
|
||||
config.Env["ACT_EXEC"] = "true"
|
||||
|
||||
if t := config.Secrets["GITEA_TOKEN"]; t != "" {
|
||||
config.Token = t
|
||||
} else if t := config.Secrets["GITHUB_TOKEN"]; t != "" {
|
||||
config.Token = t
|
||||
}
|
||||
|
||||
if !execArgs.debug {
|
||||
logLevel := log.Level(log.InfoLevel)
|
||||
config.JobLoggerLevel = &logLevel
|
||||
|
Loading…
Reference in New Issue
Block a user