From 32d29f0813fc28a52be5120c8da5d88763dce8df Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Tue, 20 Jun 2023 02:08:35 +0000 Subject: [PATCH] add ACT_EXEC (#246) Add env variable to distinguish build run locally from remote one. Co-authored-by: Jason Song Reviewed-on: https://gitea.com/gitea/act_runner/pulls/246 Reviewed-by: Jason Song Co-authored-by: Tomasz Duda Co-committed-by: Tomasz Duda --- internal/app/cmd/exec.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/app/cmd/exec.go b/internal/app/cmd/exec.go index 8764a44..37571e7 100644 --- a/internal/app/cmd/exec.go +++ b/internal/app/cmd/exec.go @@ -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