add tag input

Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
This commit is contained in:
Luca Stocchi 2020-11-19 10:00:49 +01:00
parent deaddbe502
commit 126e839197
No known key found for this signature in database
GPG key ID: 930BB00F3FCF30A4
5 changed files with 13 additions and 3 deletions

View file

@ -27,6 +27,12 @@ Note that GitHub's [Ubuntu Environments](https://github.com/actions/virtual-envi
<td>Name to give to the image that will be eventually created.</td>
</tr>
<tr>
<td>tag</td>
<td>No</td>
<td>Tag to give to the image that will be eventually created (default: latest)</td>
</tr>
<tr>
<td>base-name</td>
<td>No</td>

View file

@ -8,6 +8,10 @@ inputs:
image:
description: 'The name (reference) of the image to build'
required: true
tag:
description: 'The tag of the image to build'
required: false
default: latest
base-image:
description: 'The base image to use to create a new container image'
required: false

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -18,7 +18,7 @@ export async function run(): Promise<void> {
const workspace = process.env['GITHUB_WORKSPACE'];
let dockerFiles = getInputList('dockerfiles');
const newImage = core.getInput('image');
const newImage = `${core.getInput('image')}:${core.getInput('tag')}`;
if (dockerFiles.length !== 0) {
doBuildUsingDockerFiles(cli, newImage, workspace, dockerFiles);