mirror of
				https://github.com/docker/setup-buildx-action.git
				synced 2025-11-04 06:34:19 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			414 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			414 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import * as httpm from '@actions/http-client';
 | 
						|
 | 
						|
export interface GitHubRelease {
 | 
						|
  id: number;
 | 
						|
  tag_name: string;
 | 
						|
}
 | 
						|
 | 
						|
export const getRelease = async (version: string): Promise<GitHubRelease | null> => {
 | 
						|
  const url: string = `https://github.com/docker/buildx/releases/${version}`;
 | 
						|
  const http: httpm.HttpClient = new httpm.HttpClient('setup-buildx');
 | 
						|
  return (await http.getJson<GitHubRelease>(url)).result;
 | 
						|
};
 |