mirror of
				https://github.com/docker/setup-buildx-action.git
				synced 2025-11-04 14:44:20 +08:00 
			
		
		
		
	enforce baseUrl to api.github.com if action used on GHES
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									a024221c60
								
							
						
					
					
						commit
						a8165e7b70
					
				@ -10,7 +10,9 @@ const [owner, repo] = 'docker/buildx'.split('/');
 | 
				
			|||||||
export const getReleaseTag = async (tag: string, githubToken: string): Promise<Release> => {
 | 
					export const getReleaseTag = async (tag: string, githubToken: string): Promise<Release> => {
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    await github
 | 
					    await github
 | 
				
			||||||
      .getOctokit(githubToken)
 | 
					      .getOctokit(githubToken, {
 | 
				
			||||||
 | 
					        baseUrl: 'https://api.github.com'
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
      .rest.repos.getReleaseByTag({
 | 
					      .rest.repos.getReleaseByTag({
 | 
				
			||||||
        owner,
 | 
					        owner,
 | 
				
			||||||
        repo,
 | 
					        repo,
 | 
				
			||||||
@ -25,7 +27,9 @@ export const getReleaseTag = async (tag: string, githubToken: string): Promise<R
 | 
				
			|||||||
export const getLatestRelease = async (githubToken: string): Promise<Release> => {
 | 
					export const getLatestRelease = async (githubToken: string): Promise<Release> => {
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    await github
 | 
					    await github
 | 
				
			||||||
      .getOctokit(githubToken)
 | 
					      .getOctokit(githubToken, {
 | 
				
			||||||
 | 
					        baseUrl: 'https://api.github.com'
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
      .rest.repos.getLatestRelease({
 | 
					      .rest.repos.getLatestRelease({
 | 
				
			||||||
        owner,
 | 
					        owner,
 | 
				
			||||||
        repo
 | 
					        repo
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user