diff --git a/__tests__/config.test.ts b/__tests__/config.test.ts index c6b0eb7..8fbe2d5 100644 --- a/__tests__/config.test.ts +++ b/__tests__/config.test.ts @@ -230,7 +230,7 @@ function configureEventContext(): void { process.env.GITHUB_API_URL = 'apiBaseUrl' process.env.RUNNER_TEMP = 'runnerTempDir' process.env.GITHUB_SHA = 'sha' - process.env.GITHUB_SERVER_URL = 'github.com' + process.env.GITHUB_SERVER_URL = 'https://github.com/' process.env.GITHUB_REPOSITORY_ID = 'repositoryId' process.env.GITHUB_REPOSITORY_OWNER_ID = 'repositoryOwnerId' github.context.eventName = 'release' diff --git a/dist/index.js b/dist/index.js index 273d85b..9ec1b06 100644 --- a/dist/index.js +++ b/dist/index.js @@ -128230,9 +128230,8 @@ async function resolvePublishActionOptions() { } // Required Values fetched from the GitHub API const containerRegistryUrl = await iaToolkit.getContainerRegistryURL(apiBaseUrl); - // TODO: Figure out if there's a better way to do this - const isEnterprise = !githubServerUrl.endsWith('github.com') && - !githubServerUrl.endsWith('ghe.com'); + const isEnterprise = !githubServerUrl.includes('https://github.com') && + !githubServerUrl.endsWith('.ghe.com'); return { event, ref, diff --git a/src/config.ts b/src/config.ts index 2b88d94..a4df516 100644 --- a/src/config.ts +++ b/src/config.ts @@ -93,10 +93,9 @@ export async function resolvePublishActionOptions(): Promise