From 19764bcb06ac9acdd7100d95c72055b697820705 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 12 Sep 2023 16:35:25 +0300 Subject: [PATCH] feat: support interpolation in `.container.options` (#1958) --- pkg/runner/run_context.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index 37f4767..51a7c9f 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -518,14 +518,14 @@ func (rc *RunContext) platformImage(ctx context.Context) string { return rc.runsOnImage(ctx) } -func (rc *RunContext) options(_ context.Context) string { +func (rc *RunContext) options(ctx context.Context) string { job := rc.Run.Job() c := job.Container() - if c == nil { - return rc.Config.ContainerOptions + if c != nil { + return rc.ExprEval.Interpolate(ctx, c.Options) } - return c.Options + return rc.Config.ContainerOptions } func (rc *RunContext) isEnabled(ctx context.Context) (bool, error) {