1
0
Fork 0

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
pull/947/head
Sindri Guðmundsson 2021-11-25 12:13:32 +00:00
parent 45d2019161
commit 69af44e00d
1 changed files with 3 additions and 0 deletions

View File

@ -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'] ||
''