Add feature to output image with multiple tags ()

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
Divyanshu Agrawal 2021-02-01 23:24:50 +05:30 committed by GitHub
parent 75dab40354
commit 88e0085544
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 1971 additions and 154 deletions

View file

@ -31,10 +31,10 @@ After building your image, use [push-to-registry](https://github.com/redhat-acti
</tr>
<tr>
<td>tag</td>
<td>tags</td>
<td>No</td>
<td>
Tag to give to the output image.<br>
The tags of the image to build. For multiple tags, separate by a space. For example, <code>latest ${{ github.sha }}</code>.<br>
Default: <code>latest</code>
</td>
</tr>
@ -42,7 +42,7 @@ After building your image, use [push-to-registry](https://github.com/redhat-acti
<tr>
<td>base-image</td>
<td>No</td>
<td>The base image to use to create the initial container. If not specified, the action will try to pick one automatically. (N.B: At this time the action is only able to auto select Java base image)</td>
<td>The base image to use for the container.</td>
</tr>
<tr>
@ -118,6 +118,14 @@ envs: |
</tr>
</table>
## Action Outputs
`image`: The name of the built image.<br>
For example, `spring-image`.
`tags`: A list of the tags that were created, separated by spaces.<br>
For example, `latest ${{ github.sha }}`.
## Build Types
You can configure the `buildah` action to build your image using one or more Dockerfiles, or none at all.
@ -144,7 +152,7 @@ jobs:
uses: redhat-actions/buildah-build@v1
with:
image: my-new-image
tag: v1
tags: v1 ${{ github.sha }}
dockerfiles: |
./Dockerfile
build-args: |
@ -186,7 +194,7 @@ jobs:
with:
base-image: docker.io/fabric8/java-alpine-openjdk11-jre
image: my-new-image
tag: v1
tags: v1
content: |
target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
entrypoint: java -jar spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar