mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-06-08 01:49:03 +00:00
Output msg if tags input is not provided (#33)
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
d871ed8ae9
commit
76570bc65b
6 changed files with 13 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue