feat: support interpolation in `<job>.container.options` (#1958)

This commit is contained in:
Elian Doran 2023-09-12 16:35:25 +03:00 committed by GitHub
parent c84a3ef6d0
commit 19764bcb06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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) {