add ACT_EXEC (#246)

Add env variable to distinguish build run locally from remote one.

Co-authored-by: Jason Song <i@wolfogre.com>
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/246
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: Tomasz Duda <tomaszduda23@gmail.com>
Co-committed-by: Tomasz Duda <tomaszduda23@gmail.com>
pull/41/head
Tomasz Duda 2023-06-20 02:08:35 +00:00 committed by Jason Song
parent 2e2c0400c8
commit 32d29f0813
1 changed files with 2 additions and 0 deletions

View File

@ -414,6 +414,8 @@ func runExec(ctx context.Context, execArgs *executeArgs) func(cmd *cobra.Command
ValidVolumes: []string{"**"}, // All volumes are allowed for `exec` command ValidVolumes: []string{"**"}, // All volumes are allowed for `exec` command
} }
config.Env["ACT_EXEC"] = "true"
if !execArgs.debug { if !execArgs.debug {
logLevel := log.Level(log.InfoLevel) logLevel := log.Level(log.InfoLevel)
config.JobLoggerLevel = &logLevel config.JobLoggerLevel = &logLevel