mirror of
https://github.com/docker/bake-action.git
synced 2025-07-14 12:41:53 +02: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)
|
||||
as a high-level build command.
|
||||
|
||||

|
||||
|
||||
___
|
||||
|
||||
* [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 {
|
||||
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;
|
||||
}
|
||||
const bxVersion = yield buildx.getVersion();
|
||||
core.debug(`buildx version: ${bxVersion}`);
|
||||
const inputs = yield context.getInputs();
|
||||
const args = yield context.getArgs(inputs, bxVersion);
|
||||
core.startGroup(`Bake definition`);
|
||||
@ -5797,10 +5796,10 @@ function getInputs() {
|
||||
builder: core.getInput('builder'),
|
||||
files: getInputList('files'),
|
||||
targets: getInputList('targets'),
|
||||
noCache: /true/i.test(core.getInput('no-cache')),
|
||||
pull: /true/i.test(core.getInput('pull')),
|
||||
load: /true/i.test(core.getInput('load')),
|
||||
push: /true/i.test(core.getInput('push')),
|
||||
noCache: core.getBooleanInput('no-cache'),
|
||||
pull: core.getBooleanInput('pull'),
|
||||
load: core.getBooleanInput('load'),
|
||||
push: core.getBooleanInput('push'),
|
||||
set: getInputList('set', true)
|
||||
};
|
||||
});
|
||||
|
@ -19,10 +19,10 @@ export async function getInputs(): Promise<Inputs> {
|
||||
builder: core.getInput('builder'),
|
||||
files: getInputList('files'),
|
||||
targets: getInputList('targets'),
|
||||
noCache: /true/i.test(core.getInput('no-cache')),
|
||||
pull: /true/i.test(core.getInput('pull')),
|
||||
load: /true/i.test(core.getInput('load')),
|
||||
push: /true/i.test(core.getInput('push')),
|
||||
noCache: core.getBooleanInput('no-cache'),
|
||||
pull: core.getBooleanInput('pull'),
|
||||
load: core.getBooleanInput('load'),
|
||||
push: core.getBooleanInput('push'),
|
||||
set: getInputList('set', true)
|
||||
};
|
||||
}
|
||||
|
@ -17,8 +17,6 @@ async function run(): Promise<void> {
|
||||
}
|
||||
|
||||
const bxVersion = await buildx.getVersion();
|
||||
core.debug(`buildx version: ${bxVersion}`);
|
||||
|
||||
const inputs: context.Inputs = await context.getInputs();
|
||||
const args: string[] = await context.getArgs(inputs, bxVersion);
|
||||
|
||||
|
Reference in New Issue
Block a user