Skip to content

Commit 03bdd49

Browse files
authored
Merge pull request #27 from crazy-max/bool-input
Use `core.getBooleanInput`
2 parents e0c3724 + 41a29e2 commit 03bdd49

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

.github/bake-action.png

19.1 KB
Loading

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ of this action in your workflow (i.e `docker/[email protected]`).
1414
GitHub Action to use Docker [Buildx Bake](https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md)
1515
as a high-level build command.
1616

17+
![Screenshot](.github/bake-action.png)
18+
1719
___
1820

1921
* [Usage](#usage)

__tests__/context.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('setOutput', () => {
188188
});
189189
});
190190

191-
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
191+
// See: https://github.com/actions/toolkit/blob/a1b068ec31a042ff1e10a522d8fdf0b8869d53ca/packages/core/src/core.ts#L89
192192
function getInputName(name: string): string {
193193
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
194194
}

dist/index.js

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/context.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export async function getInputs(): Promise<Inputs> {
1919
builder: core.getInput('builder'),
2020
files: getInputList('files'),
2121
targets: getInputList('targets'),
22-
noCache: /true/i.test(core.getInput('no-cache')),
23-
pull: /true/i.test(core.getInput('pull')),
24-
load: /true/i.test(core.getInput('load')),
25-
push: /true/i.test(core.getInput('push')),
22+
noCache: core.getBooleanInput('no-cache'),
23+
pull: core.getBooleanInput('pull'),
24+
load: core.getBooleanInput('load'),
25+
push: core.getBooleanInput('push'),
2626
set: getInputList('set', true)
2727
};
2828
}

src/main.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ async function run(): Promise<void> {
1717
}
1818

1919
const bxVersion = await buildx.getVersion();
20-
core.debug(`buildx version: ${bxVersion}`);
21-
2220
const inputs: context.Inputs = await context.getInputs();
2321
const args: string[] = await context.getArgs(inputs, bxVersion);
2422

0 commit comments

Comments
 (0)