Skip to content

Commit

Permalink
Merge pull request #205 from crazy-max/align-inputs-iface
Browse files Browse the repository at this point in the history
align interface fields with action inputs
  • Loading branch information
crazy-max committed May 6, 2024
2 parents 35800c7 + 7361386 commit ea5f9ae
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion __tests__/context.test.ts
Expand Up @@ -340,7 +340,7 @@ describe('getArgs', () => {
{
files: inp.files,
load: inp.load,
noCache: inp.noCache,
noCache: inp['no-cache'],
overrides: inp.set,
provenance: inp.provenance,
push: inp.push,
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/context.ts
Expand Up @@ -15,15 +15,15 @@ export interface Inputs {
files: string[];
workdir: string;
targets: string[];
noCache: boolean;
'no-cache': boolean;
pull: boolean;
load: boolean;
provenance: string;
push: boolean;
sbom: string;
set: string[];
source: string;
githubToken: string;
'github-token': string;
}

export async function getInputs(): Promise<Inputs> {
Expand All @@ -32,15 +32,15 @@ export async function getInputs(): Promise<Inputs> {
files: Util.getInputList('files'),
workdir: core.getInput('workdir') || '.',
targets: Util.getInputList('targets'),
noCache: core.getBooleanInput('no-cache'),
'no-cache': core.getBooleanInput('no-cache'),
pull: core.getBooleanInput('pull'),
load: core.getBooleanInput('load'),
provenance: Build.getProvenanceInput('provenance'),
push: core.getBooleanInput('push'),
sbom: core.getInput('sbom'),
set: Util.getInputList('set', {ignoreComma: true, quote: false}),
source: getSourceInput('source'),
githubToken: core.getInput('github-token')
'github-token': core.getInput('github-token')
};
}

Expand Down Expand Up @@ -92,7 +92,7 @@ async function getBakeArgs(inputs: Inputs, definition: BakeDefinition, toolkit:

async function getCommonArgs(inputs: Inputs): Promise<Array<string>> {
const args: Array<string> = [];
if (inputs.noCache) {
if (inputs['no-cache']) {
args.push('--no-cache');
}
if (inputs.builder) {
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Expand Up @@ -21,7 +21,7 @@ actionsToolkit.run(
async () => {
const inputs: context.Inputs = await context.getInputs();
const toolkit = new Toolkit();
const gitAuthToken = process.env.BUILDX_BAKE_GIT_AUTH_TOKEN ?? inputs.githubToken;
const gitAuthToken = process.env.BUILDX_BAKE_GIT_AUTH_TOKEN ?? inputs['github-token'];

await core.group(`GitHub Actions runtime token ACs`, async () => {
try {
Expand Down Expand Up @@ -82,7 +82,7 @@ actionsToolkit.run(
{
files: inputs.files,
load: inputs.load,
noCache: inputs.noCache,
noCache: inputs['no-cache'],
overrides: inputs.set,
provenance: inputs.provenance,
push: inputs.push,
Expand Down

0 comments on commit ea5f9ae

Please sign in to comment.