3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-08-02 19:30:24 +00:00

fix: merge remote-tracking branch 'upstream/main'

This commit is contained in:
Matthew Matl 2025-07-23 14:58:18 -07:00
commit 356864ca69
No known key found for this signature in database
55 changed files with 17691 additions and 4478 deletions

View file

@ -7,7 +7,13 @@ export function isGhes(): boolean {
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 isGitHubEnterpriseCloudHost = hostname.endsWith(".GHE.COM");
const isLocalHost = hostname.endsWith(".LOCALHOST");
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
}
export function isExactKeyMatch(key: string, cacheKey?: string): boolean {