mirror of https://github.com/actions/toolkit
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 contextpull/947/head
parent
45d2019161
commit
69af44e00d
|
@ -32,7 +32,10 @@ const versionSalt = '1.0'
|
||||||
|
|
||||||
function getCacheApiUrl(resource: string): string {
|
function getCacheApiUrl(resource: string): string {
|
||||||
// Ideally we just use ACTIONS_CACHE_URL
|
// 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 = (
|
const baseUrl: string = (
|
||||||
|
process.env['GITHUB_ACTIONS_CACHE_URL'] ||
|
||||||
process.env['ACTIONS_CACHE_URL'] ||
|
process.env['ACTIONS_CACHE_URL'] ||
|
||||||
process.env['ACTIONS_RUNTIME_URL'] ||
|
process.env['ACTIONS_RUNTIME_URL'] ||
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in New Issue