summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Nicora <claudio.nicora@gmail.com>2024-03-04 03:56:52 +0100
committerJason Song <i@wolfogre.com>2024-03-04 03:56:52 +0100
commit7e20ddf9284645dc1b351b6f5d0df8ee59919325 (patch)
tree6430cc245b9ae692aaa73862140911baaf4f4206
parentMake runs-on support variable expression (#91) (diff)
downloadforgejo-act-7e20ddf9284645dc1b351b6f5d0df8ee59919325.tar.xz
forgejo-act-7e20ddf9284645dc1b351b6f5d0df8ee59919325.zip
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 <i@wolfogre.com> Co-authored-by: Claudio Nicora <claudio.nicora@gmail.com> Co-committed-by: Claudio Nicora <claudio.nicora@gmail.com>
-rw-r--r--pkg/runner/run_context.go2
1 files changed, 1 insertions, 1 deletions
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