Skip to content

Commit

Permalink
Use core.getBooleanInput
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jun 22, 2021
1 parent 93a9859 commit 616e830
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion __tests__/context.test.ts
Expand Up @@ -592,7 +592,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
8 changes: 4 additions & 4 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 @@ -74,13 +74,13 @@ export async function getInputs(defaultContext: string): Promise<Inputs> {
context: core.getInput('context') || defaultContext,
file: core.getInput('file'),
labels: await getInputList('labels', true),
load: /true/i.test(core.getInput('load')),
load: core.getBooleanInput('load'),
network: core.getInput('network'),
noCache: /true/i.test(core.getInput('no-cache')),
noCache: core.getBooleanInput('no-cache'),
outputs: await getInputList('outputs', true),
platforms: await getInputList('platforms'),
pull: /true/i.test(core.getInput('pull')),
push: /true/i.test(core.getInput('push')),
pull: core.getBooleanInput('pull'),
push: core.getBooleanInput('push'),
secrets: await getInputList('secrets', true),
secretFiles: await getInputList('secret-files', true),
ssh: await getInputList('ssh'),
Expand Down

0 comments on commit 616e830

Please sign in to comment.