From f147e45da3b29e555527cd178a5c07f1240aeb62 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Tue, 5 Mar 2024 07:04:54 +0100 Subject: [PATCH] fix: docker buildx cache restore not working --- act/artifactcache/handler.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/act/artifactcache/handler.go b/act/artifactcache/handler.go index c48bb1a9..28bacec5 100644 --- a/act/artifactcache/handler.go +++ b/act/artifactcache/handler.go @@ -431,7 +431,12 @@ func findCache(db *bolthold.Store, repo string, keys []string, version string) ( return nil, fmt.Errorf("find cache: %w", err) } return cache, nil + } else if cache.Complete { + return cache, nil } + } + + for _, prefix := range keys { prefixPattern := fmt.Sprintf("^%s", regexp.QuoteMeta(prefix)) re, err := regexp.Compile(prefixPattern) if err != nil {