mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-04-20 09:36:45 +00:00
platforms input
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
2dfca373f3
commit
f6efb5fcbb
5 changed files with 64 additions and 20 deletions
|
@ -29,6 +29,7 @@ export interface Inputs {
|
|||
driver: string;
|
||||
driverOpts: string[];
|
||||
buildkitdFlags: string;
|
||||
platforms: string[];
|
||||
install: boolean;
|
||||
use: boolean;
|
||||
endpoint: string;
|
||||
|
@ -44,6 +45,7 @@ export async function getInputs(): Promise<Inputs> {
|
|||
driver: core.getInput('driver') || 'docker-container',
|
||||
driverOpts: await getInputList('driver-opts', true),
|
||||
buildkitdFlags: core.getInput('buildkitd-flags') || '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
||||
platforms: await getInputList('platforms'),
|
||||
install: core.getBooleanInput('install'),
|
||||
use: core.getBooleanInput('use'),
|
||||
endpoint: core.getInput('endpoint'),
|
||||
|
@ -67,6 +69,9 @@ export async function getCreateArgs(inputs: Inputs, buildxVersion: string): Prom
|
|||
args.push('--buildkitd-flags', inputs.buildkitdFlags);
|
||||
}
|
||||
}
|
||||
if (inputs.platforms.length > 0) {
|
||||
args.push('--platform', inputs.platforms.join(','));
|
||||
}
|
||||
if (inputs.use) {
|
||||
args.push('--use');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue