runner/act
Earl Warren 4a8d6556c7 chore(cleanup): delete a network scheduled for deletion even if there is no service (#189)
In the current implementation, the network will only be created and be scheduled to be deleted when there is a service:

```go
func (rc *RunContext) networkName() (string, bool) {
	if len(rc.Run.Job().Services) > 0 || rc.Config.ContainerNetworkMode == "" {
		return fmt.Sprintf("%s-%s-network", rc.jobContainerName(), rc.Run.JobID), true
	}
	return string(rc.Config.ContainerNetworkMode), false
}
```

Therefore it does not currently make a difference. However, in case the network creation logic changes and a network is created even if a service is not present, it would be incorrect not to delete it.

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/189
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-22 06:08:31 +00:00
..
artifactcache Revert "fix: docker buildx cache restore not working" (#173) 2025-07-07 11:06:04 +00:00
artifacts feat!: add the validate argument to reading workflows (#180) 2025-07-16 08:46:36 +00:00
cacheproxy chore(refactor): add common.RandName to keep name generation DRY 2025-07-12 18:54:17 +02:00
common chore(refactor): add common.RandName to keep name generation DRY 2025-07-12 18:54:17 +02:00
container Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 [skip cascade] (#185) 2025-07-16 06:52:51 +00:00
exprparser chore(lint): fix lint errors 2024-12-30 21:11:02 +00:00
filecollector [RDNF #18] Meta-copy-symlinks-new-actions-cache (#2337) (#159) 2025-07-02 13:48:12 +00:00
jobparser feat!: add the validate argument to reading workflows (#180) 2025-07-16 08:46:36 +00:00
lookpath feat: Host environment (#1293) 2022-11-16 21:29:45 +00:00
model feat: use hashed uses string as cache dir name (#186) 2025-07-21 21:08:46 +00:00
runner chore(cleanup): delete a network scheduled for deletion even if there is no service (#189) 2025-07-22 06:08:31 +00:00
schema feat: expressions in env can use the env context, that works 2025-07-12 17:46:16 +02:00
testutils fix: image credentials for services must not override container image credentials (#181) 2025-07-15 20:55:38 +00:00
workflowpattern feat: workflowpattern package (#1618) 2023-02-23 18:21:08 +00:00