mirror of
https://github.com/actions/cache.git
synced 2025-04-19 02:26:45 +00:00
update @actions/cache
This commit is contained in:
parent
37e7d4eb16
commit
d2c84da363
7 changed files with 102 additions and 86 deletions
5
dist/save/index.js
vendored
5
dist/save/index.js
vendored
|
@ -707,7 +707,10 @@ function assertDefined(name, value) {
|
|||
exports.assertDefined = assertDefined;
|
||||
function isGhes() {
|
||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
||||
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
|
||||
return !isGitHubHost && !isGheHost;
|
||||
}
|
||||
exports.isGhes = isGhes;
|
||||
//# sourceMappingURL=cacheUtils.js.map
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue