mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-07-20 13:38:23 +02:00
make cloud prefix optional to download buildx if driver is cloud
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
db63cee3de
commit
7199e57b35
4 changed files with 155 additions and 5 deletions
|
@ -116,3 +116,17 @@ export async function getInspectArgs(inputs: Inputs, toolkit: Toolkit): Promise<
|
|||
function driverSupportsBuildkitdFlags(driver: string): boolean {
|
||||
return driver == '' || driver == 'docker-container' || driver == 'docker' || driver == 'kubernetes';
|
||||
}
|
||||
|
||||
export function getVersion(inputs: Inputs): string {
|
||||
const version = inputs.version;
|
||||
if (inputs.driver === 'cloud') {
|
||||
if (!version || version === 'latest') {
|
||||
return 'cloud:latest';
|
||||
}
|
||||
if (version.startsWith('cloud:') || version.startsWith('lab:')) {
|
||||
return version;
|
||||
}
|
||||
return `cloud:${version}`;
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue