mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-04-20 09:01:23 +00:00
Resolve reviews
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
2ac3ffcd06
commit
bbf5101786
3 changed files with 9 additions and 7 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
12
src/index.ts
12
src/index.ts
|
@ -17,18 +17,20 @@ export async function run(): Promise<void> {
|
|||
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) || DEFAULT_TAG;
|
||||
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);
|
||||
// remove white spaces (if any) in archs input
|
||||
archs = archs.replace(/\s+/g, "");
|
||||
|
||||
if (!tagsList.length) {
|
||||
core.info(`Input ${Inputs.TAGS} is not provided, using default tag ${DEFAULT_TAG}`);
|
||||
}
|
||||
|
||||
if (dockerFiles.length !== 0) {
|
||||
await doBuildUsingDockerFiles(cli, newImage, workspace, dockerFiles, useOCI, archs);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue