mirror of
https://code.forgejo.org/docker/build-push-action.git
synced 2025-09-16 18:06:55 +00:00
Add name output to identify builder instance name
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
b72149bbe7
commit
0cc5e42c7a
7 changed files with 72 additions and 20 deletions
|
@ -19,6 +19,15 @@ export async function isAvailable(): Promise<Boolean> {
|
|||
});
|
||||
}
|
||||
|
||||
export async function countBuilders(): Promise<number> {
|
||||
return await exec.exec(`docker`, ['buildx', 'ls'], true).then(res => {
|
||||
if (res.stderr != '' && !res.success) {
|
||||
throw new Error(`Cannot list builders: ${res.stderr}`);
|
||||
}
|
||||
return (res.stdout.trim().split(`\n`).length - 1) / 2;
|
||||
});
|
||||
}
|
||||
|
||||
export async function install(inputVersion: string, dockerConfigHome: string): Promise<string> {
|
||||
const release: github.GitHubRelease | null = await github.getRelease(inputVersion);
|
||||
if (!release) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue