From 06ec6ae8d6b022d3197a045a8892eb2f5b7336ba Mon Sep 17 00:00:00 2001 From: Louis Haftmann <30736553+LouisHaftmann@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:22:24 +0100 Subject: [PATCH] feat: allow passing custom `ACTIONS_CACHE_URL` --- packages/cache/src/cache.ts | 2 +- packages/cache/src/internal/cacheHttpClient.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cache/src/cache.ts b/packages/cache/src/cache.ts index f7fadb6f..808fbb47 100644 --- a/packages/cache/src/cache.ts +++ b/packages/cache/src/cache.ts @@ -50,7 +50,7 @@ function checkKey(key: string): void { */ export function isFeatureAvailable(): boolean { - return !!process.env['ACTIONS_CACHE_URL'] + return !!process.env['CUSTOM_ACTIONS_CACHE_URL'] || !!process.env['ACTIONS_CACHE_URL'] } /** diff --git a/packages/cache/src/internal/cacheHttpClient.ts b/packages/cache/src/internal/cacheHttpClient.ts index f96ca381..ab8b2892 100644 --- a/packages/cache/src/internal/cacheHttpClient.ts +++ b/packages/cache/src/internal/cacheHttpClient.ts @@ -40,7 +40,7 @@ import { const versionSalt = '1.0' function getCacheApiUrl(resource: string): string { - const baseUrl: string = process.env['ACTIONS_CACHE_URL'] || '' + const baseUrl: string = process.env['CUSTOM_ACTIONS_CACHE_URL'] || process.env['ACTIONS_CACHE_URL'] || '' if (!baseUrl) { throw new Error('Cache Service Url not found, unable to restore cache.') }