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
2f2d1a7280
commit
687dc7101f
4 changed files with 14 additions and 11 deletions
|
@ -28,12 +28,13 @@ After building your image, use [push-to-registry](https://github.com/redhat-acti
|
|||
| arch | Label the image with this architecture, instead of defaulting to the host architecture. Refer to [Multi arch builds](#multi-arch-builds) for more information. | None (host architecture)
|
||||
| build-args | Build arguments to pass to the Docker build using `--build-arg`, if using a Containerfile that requires ARGs. Use the form `arg_name=arg_value`, and separate arguments with newlines. | None
|
||||
| context | Path to directory to use as the build context. | `.`
|
||||
| containerfiles | The list of Containerfile paths to perform a build using docker instructions. This is a multiline input to allow multiple Containerfiles. | **Must be provided**
|
||||
| containerfiles* | The list of Containerfile paths to perform a build using docker instructions. This is a multiline input to allow multiple Containerfiles. | **Must be provided**
|
||||
| extra-args | Extra args to be passed to buildah bud. Separate arguments by newline. Do not use quotes. | None
|
||||
| image | Name to give to the output image. | **Must be provided**
|
||||
| layers | Set to true to cache intermediate layers during the build process. | None
|
||||
| oci | Build the image using the OCI format, instead of the Docker format. By default, this is `false`, because images built using the OCI format have issues when published to Dockerhub. | `false`
|
||||
| tags | The tags of the image to build. For multiple tags, separate by a space. For example, `latest ${{ github.sha }}` | `latest`
|
||||
> *Input `containerfiles` was previously `dockerfiles`. Now input `dockerfiles` is supported alias of `containerfiles`. For details see the [linked issue](https://github.com/redhat-actions/buildah-build/issues/57).
|
||||
|
||||
<a id="scratch-build-inputs"></a>
|
||||
|
||||
|
|
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
16
src/utils.ts
16
src/utils.ts
|
@ -72,8 +72,9 @@ export function getArch(): string {
|
|||
|
||||
if (arch && archs) {
|
||||
core.warning(
|
||||
`Please use only one input of "${Inputs.ARCH}" and "${Inputs.ARCHS}". "${Inputs.ARCH}" takes precedence, `
|
||||
+ `so --arch argument will be "${arch}".`
|
||||
`Both "${Inputs.ARCH}" and "${Inputs.ARCHS}" inputs are set. `
|
||||
+ `Please use only one of these two inputs, as they are aliases of one another. `
|
||||
+ `"${Inputs.ARCH}" takes precedence.`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -88,8 +89,9 @@ export function getContainerfiles(): string[] {
|
|||
|
||||
if (containerfiles.length !== 0 && dockerfiles.length !== 0) {
|
||||
core.warning(
|
||||
`Please use only one input of "${Inputs.CONTAINERFILES}" and "${Inputs.DOCKERFILES}". `
|
||||
+ `"${Inputs.CONTAINERFILES}" takes precedence, `
|
||||
`Both "${Inputs.CONTAINERFILES}" and "${Inputs.DOCKERFILES}" inputs are set. `
|
||||
+ `Please use only one of these two inputs, as they are aliases of one another. `
|
||||
+ `"${Inputs.CONTAINERFILES}" takes precedence.`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -101,11 +103,11 @@ export function getInputList(name: string): string[] {
|
|||
if (!items) {
|
||||
return [];
|
||||
}
|
||||
return items
|
||||
.split(/\r?\n/)
|
||||
const splitItems = splitByNewline(items);
|
||||
return splitItems
|
||||
.filter((x) => x)
|
||||
.reduce<string[]>(
|
||||
(acc, line) => acc.concat(line).map((pat) => pat.trim()),
|
||||
(acc, line) => acc.concat(line).map((item) => item.trim()),
|
||||
[],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue