fix: send artifacts to Gitea when jobs cannot reach the cache server (#1225)

Container jobs on a Docker bridge network isolated from the runner's cache server now upload artifacts to Gitea directly instead of timing out, with a job log warning on how to make the cache reachable.

Fixes https://gitea.com/gitea/runner/issues/1211

Reviewed-on: https://gitea.com/gitea/runner/pulls/1225
Reviewed-by: bircni <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind
2026-09-14 19:52:15 +00:00
committed by silverwind
parent 2cc3000369
commit 19afebc53f
7 changed files with 125 additions and 10 deletions
+5
View File
@@ -9,6 +9,7 @@ package container
import (
"context"
"errors"
"net/netip"
"runtime"
"time"
@@ -17,6 +18,10 @@ import (
"github.com/moby/moby/api/types/system"
)
func IsolatedNetwork(context.Context, netip.Addr, string) (string, error) {
return "", nil
}
// ImageExistsLocally returns a boolean indicating if an image with the
// requested name, tag and architecture exists in the local docker image store
func ImageExistsLocally(ctx context.Context, imageName, platform string) (bool, error) {