Output msg if tags input is not provided (#33)

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
Divyanshu Agrawal 2021-02-24 21:43:55 +05:30 committed by divyansh42
parent d871ed8ae9
commit 76570bc65b
6 changed files with 13 additions and 6 deletions

View file

@ -13,11 +13,18 @@ export async function run(): Promise<void> {
const buildahPath = await io.which("buildah", true);
const cli: BuildahCli = new BuildahCli(buildahPath);
const DEFAULT_TAG = "latest";
const workspace = process.env.GITHUB_WORKSPACE || process.cwd();
const dockerFiles = getInputList(Inputs.DOCKERFILES);
const image = core.getInput(Inputs.IMAGE, { required: true });
const tags = core.getInput(Inputs.TAGS) || "latest";
const tags = core.getInput(Inputs.TAGS);
const tagsList: string[] = tags.split(" ");
// info message if user doesn't provides any tag
if (!tagsList.length) {
core.info(`Input "${Inputs.TAGS}" is not provided, using default tag "${DEFAULT_TAG}"`);
tagsList.push(DEFAULT_TAG);
}
const newImage = `${image}:${tagsList[0]}`;
const useOCI = core.getInput(Inputs.OCI) === "true";
let archs: string | undefined = core.getInput(Inputs.ARCHS);