mirror of
https://github.com/docker/bake-action.git
synced 2026-01-22 12:22:21 +01:00
align interface fields with action inputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -340,7 +340,7 @@ describe('getArgs', () => {
|
|||||||
{
|
{
|
||||||
files: inp.files,
|
files: inp.files,
|
||||||
load: inp.load,
|
load: inp.load,
|
||||||
noCache: inp.noCache,
|
noCache: inp['no-cache'],
|
||||||
overrides: inp.set,
|
overrides: inp.set,
|
||||||
provenance: inp.provenance,
|
provenance: inp.provenance,
|
||||||
push: inp.push,
|
push: inp.push,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export interface Inputs {
|
|||||||
files: string[];
|
files: string[];
|
||||||
workdir: string;
|
workdir: string;
|
||||||
targets: string[];
|
targets: string[];
|
||||||
noCache: boolean;
|
'no-cache': boolean;
|
||||||
pull: boolean;
|
pull: boolean;
|
||||||
load: boolean;
|
load: boolean;
|
||||||
provenance: string;
|
provenance: string;
|
||||||
@@ -23,7 +23,7 @@ export interface Inputs {
|
|||||||
sbom: string;
|
sbom: string;
|
||||||
set: string[];
|
set: string[];
|
||||||
source: string;
|
source: string;
|
||||||
githubToken: string;
|
'github-token': string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInputs(): Promise<Inputs> {
|
export async function getInputs(): Promise<Inputs> {
|
||||||
@@ -32,7 +32,7 @@ export async function getInputs(): Promise<Inputs> {
|
|||||||
files: Util.getInputList('files'),
|
files: Util.getInputList('files'),
|
||||||
workdir: core.getInput('workdir') || '.',
|
workdir: core.getInput('workdir') || '.',
|
||||||
targets: Util.getInputList('targets'),
|
targets: Util.getInputList('targets'),
|
||||||
noCache: core.getBooleanInput('no-cache'),
|
'no-cache': core.getBooleanInput('no-cache'),
|
||||||
pull: core.getBooleanInput('pull'),
|
pull: core.getBooleanInput('pull'),
|
||||||
load: core.getBooleanInput('load'),
|
load: core.getBooleanInput('load'),
|
||||||
provenance: Build.getProvenanceInput('provenance'),
|
provenance: Build.getProvenanceInput('provenance'),
|
||||||
@@ -40,7 +40,7 @@ export async function getInputs(): Promise<Inputs> {
|
|||||||
sbom: core.getInput('sbom'),
|
sbom: core.getInput('sbom'),
|
||||||
set: Util.getInputList('set', {ignoreComma: true, quote: false}),
|
set: Util.getInputList('set', {ignoreComma: true, quote: false}),
|
||||||
source: getSourceInput('source'),
|
source: getSourceInput('source'),
|
||||||
githubToken: core.getInput('github-token')
|
'github-token': core.getInput('github-token')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ async function getBakeArgs(inputs: Inputs, definition: BakeDefinition, toolkit:
|
|||||||
|
|
||||||
async function getCommonArgs(inputs: Inputs): Promise<Array<string>> {
|
async function getCommonArgs(inputs: Inputs): Promise<Array<string>> {
|
||||||
const args: Array<string> = [];
|
const args: Array<string> = [];
|
||||||
if (inputs.noCache) {
|
if (inputs['no-cache']) {
|
||||||
args.push('--no-cache');
|
args.push('--no-cache');
|
||||||
}
|
}
|
||||||
if (inputs.builder) {
|
if (inputs.builder) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ actionsToolkit.run(
|
|||||||
async () => {
|
async () => {
|
||||||
const inputs: context.Inputs = await context.getInputs();
|
const inputs: context.Inputs = await context.getInputs();
|
||||||
const toolkit = new Toolkit();
|
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 () => {
|
await core.group(`GitHub Actions runtime token ACs`, async () => {
|
||||||
try {
|
try {
|
||||||
@@ -82,7 +82,7 @@ actionsToolkit.run(
|
|||||||
{
|
{
|
||||||
files: inputs.files,
|
files: inputs.files,
|
||||||
load: inputs.load,
|
load: inputs.load,
|
||||||
noCache: inputs.noCache,
|
noCache: inputs['no-cache'],
|
||||||
overrides: inputs.set,
|
overrides: inputs.set,
|
||||||
provenance: inputs.provenance,
|
provenance: inputs.provenance,
|
||||||
push: inputs.push,
|
push: inputs.push,
|
||||||
|
|||||||
Reference in New Issue
Block a user