add token support

This commit is contained in:
Tomasz Duda 2023-06-19 21:48:12 +02:00
parent 32d29f0813
commit a02003f7d2

View file

@ -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