1
0
Fork 0
mirror of https://github.com/docker/setup-buildx-action.git synced 2024-11-26 13:11:26 +00:00
setup-buildx-action/src/github.ts

13 lines
406 B
TypeScript
Raw Normal View History

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 = `https://github.com/docker/buildx/releases/${version}`;
const http: httpm.HttpClient = new httpm.HttpClient('setup-buildx');
return (await http.getJson<GitHubRelease>(url)).result;
};