From 69af44e00d43d375cdcaf78844d8d093d078fc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sindri=20Gu=C3=B0mundsson?= Date: Thu, 25 Nov 2021 12:13:32 +0000 Subject: [PATCH] Ability to overwrite base url in actions/cache As ACTIONS_CACHE_URL cannot be overwritten in actions/cache, provide the ability to overwrite it using GITHUB_ACTIONS_CACHE_URL. See https://github.com/actions/cache/pull/679 for more context --- packages/cache/src/internal/cacheHttpClient.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cache/src/internal/cacheHttpClient.ts b/packages/cache/src/internal/cacheHttpClient.ts index 6a46f736..6eb406e9 100644 --- a/packages/cache/src/internal/cacheHttpClient.ts +++ b/packages/cache/src/internal/cacheHttpClient.ts @@ -32,7 +32,10 @@ const versionSalt = '1.0' function getCacheApiUrl(resource: string): string { // Ideally we just use ACTIONS_CACHE_URL + // For cases where ACTIONS_* cannot be overwritten, allow the usage + // of GITHUB_ACTIONS_CACHE_URL. const baseUrl: string = ( + process.env['GITHUB_ACTIONS_CACHE_URL'] || process.env['ACTIONS_CACHE_URL'] || process.env['ACTIONS_RUNTIME_URL'] || ''