1
0
Fork 0
mirror of https://github.com/docker/setup-buildx-action.git synced 2025-05-07 15:09:31 +02:00

Add context input (#16)

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-09-06 16:37:52 +02:00
parent 54edbcd840
commit 1b18b1078f
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
5 changed files with 19 additions and 6 deletions

View file

@ -10,6 +10,7 @@ export interface Inputs {
buildkitdFlags: string;
install: boolean;
use: boolean;
context: string;
}
export async function getInputs(): Promise<Inputs> {
@ -21,7 +22,8 @@ export async function getInputs(): Promise<Inputs> {
core.getInput('buildkitd-flags') ||
'--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
install: /true/i.test(core.getInput('install')),
use: /true/i.test(core.getInput('use'))
use: /true/i.test(core.getInput('use')),
context: core.getInput('context')
};
}

View file

@ -42,6 +42,9 @@ async function run(): Promise<void> {
if (inputs.use) {
createArgs.push('--use');
}
if (inputs.context) {
createArgs.push(inputs.context);
}
await exec.exec('docker', createArgs);
core.info('🏃 Booting builder...');