From 7e20ddf9284645dc1b351b6f5d0df8ee59919325 Mon Sep 17 00:00:00 2001 From: Claudio Nicora Date: Mon, 4 Mar 2024 02:56:52 +0000 Subject: [PATCH] Patched options() to let container options propagate to job containers (#80) This PR let "general" container config to be propagated to each job container. See: - https://gitea.com/gitea/act_runner/issues/265#issuecomment-744382 - https://gitea.com/gitea/act_runner/issues/79 - https://gitea.com/gitea/act_runner/issues/378 Reviewed-on: https://gitea.com/gitea/act/pulls/80 Reviewed-by: Jason Song Co-authored-by: Claudio Nicora Co-committed-by: Claudio Nicora --- pkg/runner/run_context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index 59a0161..5c8187a 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -717,7 +717,7 @@ func (rc *RunContext) options(ctx context.Context) string { job := rc.Run.Job() c := job.Container() if c != nil { - return rc.ExprEval.Interpolate(ctx, c.Options) + return rc.Config.ContainerOptions + " " + rc.ExprEval.Interpolate(ctx, c.Options) } return rc.Config.ContainerOptions