Skip to content

Commit

Permalink
Use core.getBooleanInput
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed May 26, 2021
1 parent e0c3724 commit 610065c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion __tests__/context.test.ts
Expand Up @@ -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()}`;
}
Expand Down
9 changes: 4 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/context.ts
Expand Up @@ -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)
};
}
Expand Down
2 changes: 0 additions & 2 deletions src/main.ts
Expand Up @@ -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);

Expand Down

0 comments on commit 610065c

Please sign in to comment.