From ad140aa522b7be88736359f7b855a2d6e43a0437 Mon Sep 17 00:00:00 2001 From: Jacob Gillespie Date: Tue, 12 Nov 2024 12:42:12 +0000 Subject: [PATCH] Fix GHA cache URL in Depot runners --- pkg/helpers/gha.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/helpers/gha.go b/pkg/helpers/gha.go index a1e2e7fa..cfc4befb 100644 --- a/pkg/helpers/gha.go +++ b/pkg/helpers/gha.go @@ -5,7 +5,12 @@ import "os" // If the CLI is running inside a Depot GitHub Actions runner, restore the original // GitHub Actions cache URL so that the remote BuildKit doesn't attempt to use the internal cache. func FixGitHubActionsCacheEnv() { - original := os.Getenv("GACTIONSCACHE_URL") + original := os.Getenv("UPSTREAM_ACTIONS_CACHE_URL") + + if original == "" { + original = os.Getenv("GACTIONSCACHE_URL") + } + if original != "" { os.Setenv("ACTIONS_CACHE_URL", original) }