mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-04-15 07:21:23 +00:00
Add output image-with-tag (#68)
* Add output image-with-tag Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
fe5edd5859
commit
ab006ef445
9 changed files with 17 additions and 2 deletions
1
.github/workflows/dockerfile_build.yml
vendored
1
.github/workflows/dockerfile_build.yml
vendored
|
@ -58,6 +58,7 @@ jobs:
|
|||
run: |
|
||||
echo "Image: ${{ steps.build_image.outputs.image }}"
|
||||
echo "Tags: ${{ steps.build_image.outputs.tags }}"
|
||||
echo "Tagged Image: ${{ steps.build_image.outputs.image-with-tag }}"
|
||||
|
||||
# Check if image is build
|
||||
- name: Check images created
|
||||
|
|
1
.github/workflows/multiarch.yml
vendored
1
.github/workflows/multiarch.yml
vendored
|
@ -65,6 +65,7 @@ jobs:
|
|||
run: |
|
||||
echo "Image: ${{ steps.build_image.outputs.image }}"
|
||||
echo "Tags: ${{ steps.build_image.outputs.tags }}"
|
||||
echo "Tagged Image: ${{ steps.build_image.outputs.image-with-tag }}"
|
||||
|
||||
- name: Check images created
|
||||
run: buildah images | grep '${{ env.IMAGE_NAME }}'
|
||||
|
|
1
.github/workflows/scratch_build.yml
vendored
1
.github/workflows/scratch_build.yml
vendored
|
@ -101,6 +101,7 @@ jobs:
|
|||
run: |
|
||||
echo "Image: ${{ steps.build_image.outputs.image }}"
|
||||
echo "Tags: ${{ steps.build_image.outputs.tags }}"
|
||||
echo "Tagged Image: ${{ steps.build_image.outputs.image-with-tag }}"
|
||||
|
||||
# Check if image is build
|
||||
- name: Check images created
|
||||
|
|
|
@ -62,6 +62,9 @@ For example, `spring-image`.
|
|||
`tags`: A list of the tags that were created, separated by spaces.<br>
|
||||
For example, `latest ${{ github.sha }}`.
|
||||
|
||||
`image-with-tag`: The name of the image tagged with the first tag present.<br>
|
||||
For example, `spring-image:latest`
|
||||
|
||||
<a id="build-types"></a>
|
||||
|
||||
## Build Types
|
||||
|
|
|
@ -63,6 +63,8 @@ outputs:
|
|||
description: 'Name of the image built'
|
||||
tags:
|
||||
description: 'List of the tags that were created, separated by spaces'
|
||||
image-with-tag:
|
||||
description: 'Name of the image tagged with the first tag present'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/index.js'
|
||||
|
|
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
|
@ -106,6 +106,12 @@ export enum Outputs {
|
|||
* Default: None.
|
||||
*/
|
||||
IMAGE = "image",
|
||||
/**
|
||||
* Name of the image tagged with the first tag present
|
||||
* Required: false
|
||||
* Default: None.
|
||||
*/
|
||||
IMAGE_WITH_TAG = "image-with-tag",
|
||||
/**
|
||||
* List of the tags that were created, separated by spaces
|
||||
* Required: false
|
||||
|
|
|
@ -54,6 +54,7 @@ export async function run(): Promise<void> {
|
|||
}
|
||||
core.setOutput(Outputs.IMAGE, image);
|
||||
core.setOutput(Outputs.TAGS, tags);
|
||||
core.setOutput(Outputs.IMAGE_WITH_TAG, `${image}:${tagsList[0]}`);
|
||||
}
|
||||
|
||||
async function doBuildUsingDockerFiles(
|
||||
|
|
Loading…
Reference in a new issue