mirror of https://github.com/actions/toolkit
feat: allow passing custom `ACTIONS_CACHE_URL`
parent
ef77c9d60b
commit
06ec6ae8d6
|
@ -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']
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue