1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

fix: Remove volume with same name as the container again (#1203)

* Update run_context.go

* .
This commit is contained in:
ChristopherHX 2022-06-07 16:10:43 +02:00 committed by GitHub
parent ee8f710fd9
commit f9d0f7c498

View file

@ -218,6 +218,7 @@ func (rc *RunContext) stopJobContainer() common.Executor {
return func(ctx context.Context) error {
if rc.JobContainer != nil && !rc.Config.ReuseContainers {
return rc.JobContainer.Remove().
Then(container.NewDockerVolumeRemoveExecutor(rc.jobContainerName(), false)).
Then(container.NewDockerVolumeRemoveExecutor(rc.jobContainerName()+"-env", false))(ctx)
}
return nil