mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
feat: support interpolation in <job>.container.options
(#1958)
This commit is contained in:
parent
8b8f57896d
commit
3b61c0cd55
1 changed files with 4 additions and 4 deletions
|
@ -518,14 +518,14 @@ func (rc *RunContext) platformImage(ctx context.Context) string {
|
||||||
return rc.runsOnImage(ctx)
|
return rc.runsOnImage(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rc *RunContext) options(_ context.Context) string {
|
func (rc *RunContext) options(ctx context.Context) string {
|
||||||
job := rc.Run.Job()
|
job := rc.Run.Job()
|
||||||
c := job.Container()
|
c := job.Container()
|
||||||
if c == nil {
|
if c != nil {
|
||||||
return rc.Config.ContainerOptions
|
return rc.ExprEval.Interpolate(ctx, c.Options)
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Options
|
return rc.Config.ContainerOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rc *RunContext) isEnabled(ctx context.Context) (bool, error) {
|
func (rc *RunContext) isEnabled(ctx context.Context) (bool, error) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue