mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-18 08:47:12 +02:00
Add setup-buildx action (#71)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
12
setup-buildx/src/github.ts
Normal file
12
setup-buildx/src/github.ts
Normal file
@ -0,0 +1,12 @@
|
||||
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;
|
||||
};
|
Reference in New Issue
Block a user