3
0
Fork 0
mirror of https://gitea.com/docker/build-push-action.git synced 2024-11-29 21:09:36 +01:00
docker-build-push/setup-buildx/src/github.ts

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