generated from pmo-actions/healthchecks-ping
Actualiser action.yaml
This commit is contained in:
12
action.yaml
12
action.yaml
@@ -17,6 +17,10 @@ inputs:
|
|||||||
description: 'Command used to build the image (docker|podman)'
|
description: 'Command used to build the image (docker|podman)'
|
||||||
required: false
|
required: false
|
||||||
default: docker
|
default: docker
|
||||||
|
no_cache:
|
||||||
|
description: 'Do we desactivate cache during image duilding'
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
tag_command:
|
tag_command:
|
||||||
description: 'Command used to tag the image (docker|podman)'
|
description: 'Command used to tag the image (docker|podman)'
|
||||||
required: false
|
required: false
|
||||||
@@ -69,7 +73,13 @@ runs:
|
|||||||
|
|
||||||
image="${{ inputs.registry_server }}/${{ inputs.image_name }}${sep}${tags[0]}"
|
image="${{ inputs.registry_server }}/${{ inputs.image_name }}${sep}${tags[0]}"
|
||||||
|
|
||||||
if ${{ inputs.build_command }} build -t ${image} . ; then
|
if [[ ${{ input.no_cache }} == "true" ]] ; then
|
||||||
|
nocache="--no-cache"
|
||||||
|
else
|
||||||
|
nocache=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ${{ inputs.build_command }} build ${nocache} -t ${image} . ; then
|
||||||
success "Image build" "${{ inputs.image_name }}"
|
success "Image build" "${{ inputs.image_name }}"
|
||||||
else
|
else
|
||||||
error "Failed" "Cannot built the image ${{ inputs.image_name }}"
|
error "Failed" "Cannot built the image ${{ inputs.image_name }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user