Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use core.getBooleanInput #27

Merged
merged 1 commit into from May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added .github/bake-action.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -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.

![Screenshot](.github/bake-action.png)

___

* [Usage](#usage)
Expand Down
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