mirror of
https://git.flexiblyrigid.au/actions/bake-action.git
synced 2025-12-06 07:48:05 +08:00
Use core.getBooleanInput
This commit is contained in:
BIN
.github/bake-action.png
vendored
Normal file
BIN
.github/bake-action.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -14,6 +14,8 @@ of this action in your workflow (i.e `docker/bake-action@v1.1.3`).
|
|||||||
GitHub Action to use Docker [Buildx Bake](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md)
|
GitHub Action to use Docker [Buildx Bake](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md)
|
||||||
as a high-level build command.
|
as a high-level build command.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ describe('setOutput', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
|
// See: https://github.com/actions/toolkit/blob/a1b068ec31a042ff1e10a522d8fdf0b8869d53ca/packages/core/src/core.ts#L89
|
||||||
function getInputName(name: string): string {
|
function getInputName(name: string): string {
|
||||||
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
||||||
}
|
}
|
||||||
|
|||||||
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
@@ -533,7 +533,6 @@ function run() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const bxVersion = yield buildx.getVersion();
|
const bxVersion = yield buildx.getVersion();
|
||||||
core.debug(`buildx version: ${bxVersion}`);
|
|
||||||
const inputs = yield context.getInputs();
|
const inputs = yield context.getInputs();
|
||||||
const args = yield context.getArgs(inputs, bxVersion);
|
const args = yield context.getArgs(inputs, bxVersion);
|
||||||
core.startGroup(`Bake definition`);
|
core.startGroup(`Bake definition`);
|
||||||
@@ -5797,10 +5796,10 @@ function getInputs() {
|
|||||||
builder: core.getInput('builder'),
|
builder: core.getInput('builder'),
|
||||||
files: getInputList('files'),
|
files: getInputList('files'),
|
||||||
targets: getInputList('targets'),
|
targets: getInputList('targets'),
|
||||||
noCache: /true/i.test(core.getInput('no-cache')),
|
noCache: core.getBooleanInput('no-cache'),
|
||||||
pull: /true/i.test(core.getInput('pull')),
|
pull: core.getBooleanInput('pull'),
|
||||||
load: /true/i.test(core.getInput('load')),
|
load: core.getBooleanInput('load'),
|
||||||
push: /true/i.test(core.getInput('push')),
|
push: core.getBooleanInput('push'),
|
||||||
set: getInputList('set', true)
|
set: getInputList('set', true)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ export async function getInputs(): Promise<Inputs> {
|
|||||||
builder: core.getInput('builder'),
|
builder: core.getInput('builder'),
|
||||||
files: getInputList('files'),
|
files: getInputList('files'),
|
||||||
targets: getInputList('targets'),
|
targets: getInputList('targets'),
|
||||||
noCache: /true/i.test(core.getInput('no-cache')),
|
noCache: core.getBooleanInput('no-cache'),
|
||||||
pull: /true/i.test(core.getInput('pull')),
|
pull: core.getBooleanInput('pull'),
|
||||||
load: /true/i.test(core.getInput('load')),
|
load: core.getBooleanInput('load'),
|
||||||
push: /true/i.test(core.getInput('push')),
|
push: core.getBooleanInput('push'),
|
||||||
set: getInputList('set', true)
|
set: getInputList('set', true)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bxVersion = await buildx.getVersion();
|
const bxVersion = await buildx.getVersion();
|
||||||
core.debug(`buildx version: ${bxVersion}`);
|
|
||||||
|
|
||||||
const inputs: context.Inputs = await context.getInputs();
|
const inputs: context.Inputs = await context.getInputs();
|
||||||
const args: string[] = await context.getArgs(inputs, bxVersion);
|
const args: string[] = await context.getArgs(inputs, bxVersion);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user