From 44382e7473fd964f6778db283c51ce09d7b383d8 Mon Sep 17 00:00:00 2001 From: divyansh42 Date: Tue, 16 Feb 2021 15:59:27 +0530 Subject: [PATCH] Modify Readme to divide input for build strategies Signed-off-by: divyansh42 --- README.md | 131 ++++++++++++------------------------------------------ 1 file changed, 28 insertions(+), 103 deletions(-) diff --git a/README.md b/README.md index 0ceef9b..6308ea4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # buildah-build [![CI checks](https://github.com/redhat-actions/buildah-build/workflows/CI%20checks/badge.svg)](https://github.com/redhat-actions/buildah-build/actions?query=workflow%3A%22CI+checks%22) -[![Verify Build](https://github.com/redhat-actions/buildah-build/workflows/Test%20Build/badge.svg)](https://github.com/redhat-actions/buildah-build/actions?query=workflow%3A%22Test+Build%22) +[![Test Build with dockerfile](https://github.com/redhat-actions/buildah-build/workflows/Test%20Build%20with%20dockerfile/badge.svg)](https://github.com/redhat-actions/buildah-build/actions?query=workflow%3A%22Test+Build+with+dockerfile%22) +[![Test Build without dockerfile](https://github.com/redhat-actions/buildah-build/workflows/Test%20Build%20without%20dockerfile/badge.svg)](https://github.com/redhat-actions/buildah-build/actions?query=workflow%3A%22Test+Build+without+dockerfile%22) +[![Link checker](https://github.com/redhat-actions/buildah-build/workflows/Link%20checker/badge.svg)](https://github.com/redhat-actions/buildah-build/actions?query=workflow%3A%22Link+checker%22)

[![tag badge](https://img.shields.io/github/v/tag/redhat-actions/buildah-build)](https://github.com/redhat-actions/buildah-build/tags) @@ -15,108 +17,31 @@ After building your image, use [push-to-registry](https://github.com/redhat-acti ## Action Inputs - - - - - - - - +### Inputs for build from dockerfile - - - - - +| Input Name | Description | Default | +| ---------- | ----------- | ------- | +| build-args | Build arguments to pass to the Docker build using `--build-arg`, if using a Dockerfile that requires ARGs. Uses the form `arg_name=arg_value`, and separate arguments with newlines. | None +| context | Path to directory to use as the build context. | `.` +| dockerfiles | The list of Dockerfile paths to perform a build using docker instructions. This is a multiline input to allow multiple Dockerfiles. | **Must be provided** +| image | Name to give to the output image. | **Must be provided** +| 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` - - - - - +### Inputs for build without dockerfile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
InputRequiredDescription
imageYesName to give the output image.
tagsNo - The tags of the image to build. For multiple tags, separate by a space. For example, latest ${{ github.sha }}.
- Default: latest -
base-imageNoThe base image to use for the container.
dockerfilesNoThe list of Dockerfile paths to perform a build using docker instructions. This is a multiline input to allow multiple Dockerfiles. -
ociNo - 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. -
contextNoPath to directory to use as the build context.
- Default: .
build-argsNoBuild arguments to pass to the Docker build using --build-arg, if using a Dockerfile that requires ARGs.
- Uses the form arg_name=arg_value, and separate arguments with newlines.
contentNoThe content to copy inside the container to create the final image. This is a multiline input to allow you to copy more than one file/directory.
-
content: |
-  target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
-
entrypointNoThe entry point to set for the container. This is a multiline input; split arguments across lines. -
entrypoint: |
-  java
-  -jar
-  spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
-
portNoThe port to expose when running the container.
workdirNoThe working directory to use within the container.
envsNoThe environment variables to be set when running the container. This is a multiline input to add multiple environment variables.
-
-envs: |
-  GOPATH=/root/buildah/go
-
+| Input Name | Description | Default | +| ---------- | ----------- | ------- | +| base-image | The base image to use for the container. | **Must be provided** +| content | The content to copy inside the container to create the final image. This is a multiline input to allow you to copy more than one file/directory.| No +| context | Path to directory to use as the build context. | `.` +| entrypoint | The entry point to set for the container. This is a multiline input; split arguments across lines. | None +| envs | The environment variables to be set when running the container. This is a multiline input to add multiple environment variables. | None +| image | Name to give to the output image. | **Must be provided** +| 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` +| port | The port to expose when running the container. | None +| tags | The tags of the image to build. For multiple tags, separate by a space. For example, `latest ${{ github.sha }}` | `latest` +| workdir | The working directory to use within the container. | None ## Action Outputs @@ -181,7 +106,7 @@ on: [push] jobs: build-image: - name: Build image + name: Build image without Dockerfile runs-on: ubuntu-latest steps: @@ -216,8 +141,8 @@ This is an open source project open to anyone. This project welcomes contributio ## Feedback & Questions -If you discover an issue please file a bug in [GitHub issues](https://github.com/redhat-actions/buildah/issues) and we will fix it as soon as possible. +If you discover an issue please file a bug in [GitHub issues](https://github.com/redhat-actions/buildah-build/issues) and we will fix it as soon as possible. ## License -MIT, See [LICENSE](https://github.com/redhat-actions/buildah/blob/main/LICENSE.md) for more information. +MIT, See [LICENSE](https://github.com/redhat-actions/buildah-build/blob/main/LICENSE) for more information.