From 2f624404fdb41e89bfc99e152f174f7922a5d5c5 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 --- act/runner/run_context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/act/runner/run_context.go b/act/runner/run_context.go index 59a01615..5c8187a7 100644 --- a/act/runner/run_context.go +++ b/act/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