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>
This commit is contained in:
Tomasz Duda 2023-06-20 02:08:35 +00:00 committed by Jason Song
parent 2e2c0400c8
commit 32d29f0813

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
}
config.Env["ACT_EXEC"] = "true"
if !execArgs.debug {
logLevel := log.Level(log.InfoLevel)
config.JobLoggerLevel = &logLevel