mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-01 07:03:17 +08:00
updating alowed hosts in isGhes check
updating alowed hosts in artifact ghes check using dot prepend ghe host
This commit is contained in:
@@ -27,7 +27,12 @@ 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 isGheHost = (hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST'))
|
||||
|
||||
return !isGitHubHost && !isGheHost
|
||||
}
|
||||
|
||||
export function getGitHubWorkspaceDir(): string {
|
||||
|
||||
Reference in New Issue
Block a user