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