1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-23 21:44:44 +02:00

Respect directory option for steps again (#4319)

This commit is contained in:
6543
2024-11-06 23:21:56 +01:00
committed by GitHub
parent c9752bb735
commit bf5405b6cc
10 changed files with 96 additions and 61 deletions

View File

@@ -47,11 +47,14 @@ func (e *docker) toConfig(step *types.Step) *container.Config {
maps.Copy(configEnv, step.Environment)
if len(step.Commands) > 0 {
env, entry := common.GenerateContainerConf(step.Commands, e.info.OSType)
env, entry := common.GenerateContainerConf(step.Commands, e.info.OSType, step.WorkingDir)
for k, v := range env {
configEnv[k] = v
}
config.Entrypoint = entry
// step.WorkingDir will be respected by the generated script
config.WorkingDir = step.WorkspaceBase
}
if len(step.Entrypoint) > 0 {
config.Entrypoint = step.Entrypoint