[FORGEJO] workflows: do not cascade on opened #30

Closed
earl-warren wants to merge 20 commits from earl-warren/act:wip-cascade into main
Showing only changes of commit de9ef55ef7 - Show all commits

View file

@ -477,9 +477,13 @@ func (rc *RunContext) startJobContainer() common.Executor {
return nil
}
lifetime := fmt.Sprint(rc.Config.ContainerMaxLifetime.Round(time.Second).Seconds())
if lifetime == "0" {
lifetime = "infinity"
}
rc.JobContainer = container.NewContainer(&container.NewContainerInput{
Cmd: nil,
Entrypoint: []string{"/bin/sleep", fmt.Sprint(rc.Config.ContainerMaxLifetime.Round(time.Second).Seconds())},
Entrypoint: []string{"/bin/sleep", lifetime},
WorkingDir: ext.ToContainerPath(rc.Config.Workdir),
Image: image,
Username: username,