Improve msg if tags is not provided

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
divyansh42 2021-02-24 13:24:26 +05:30
parent d871ed8ae9
commit 8f71a9c0a0
5 changed files with 8 additions and 4 deletions

View file

@ -14,7 +14,7 @@ inputs:
default: latest default: latest
base-image: base-image:
description: 'The base image to use to create a new container image' description: 'The base image to use to create a new container image'
required: true required: false
dockerfiles: dockerfiles:
description: 'List of Dockerfile paths (eg: ./Dockerfile)' description: 'List of Dockerfile paths (eg: ./Dockerfile)'
required: false required: false

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -9,7 +9,7 @@ export enum Inputs {
ARCHS = "archs", ARCHS = "archs",
/** /**
* The base image to use to create a new container image * The base image to use to create a new container image
* Required: true * Required: false
* Default: None. * Default: None.
*/ */
BASE_IMAGE = "base-image", BASE_IMAGE = "base-image",

View file

@ -24,6 +24,10 @@ export async function run(): Promise<void> {
// remove white spaces (if any) in archs input // remove white spaces (if any) in archs input
archs = archs.replace(/\s+/g, ""); archs = archs.replace(/\s+/g, "");
if (!tagsList.length) {
core.info(`Input "tags" is not provided, using default tag "latest"`);
}
if (dockerFiles.length !== 0) { if (dockerFiles.length !== 0) {
await doBuildUsingDockerFiles(cli, newImage, workspace, dockerFiles, useOCI, archs); await doBuildUsingDockerFiles(cli, newImage, workspace, dockerFiles, useOCI, archs);
} }