Compare commits

...

1 Commits

Author SHA1 Message Date
Zettat123
655f578563 Remove the network when there is no service (#103)
Reviewed-on: https://gitea.com/gitea/act/pulls/103
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2024-03-27 10:07:29 +00:00

View File

@@ -382,6 +382,7 @@ func (rc *RunContext) startJobContainer() common.Executor {
if err := rc.stopServiceContainers()(ctx); err != nil {
logger.Errorf("Error while cleaning services: %v", err)
}
}
if createAndDeleteNetwork {
// clean network if it has been created by act
// if using service containers
@@ -392,7 +393,6 @@ func (rc *RunContext) startJobContainer() common.Executor {
logger.Errorf("Error while cleaning network: %v", err)
}
}
}
return nil
})(ctx)
}