From 094369228787300b6038c981629996f5eb052361 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Mon, 28 Apr 2025 20:31:54 +0200 Subject: [PATCH] Actualiser action.yaml --- action.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 853c951..b0f3def 100644 --- a/action.yaml +++ b/action.yaml @@ -17,6 +17,10 @@ inputs: description: 'Command used to build the image (docker|podman)' required: false default: docker + no_cache: + description: 'Do we desactivate cache during image duilding' + required: false + default: false tag_command: description: 'Command used to tag the image (docker|podman)' required: false @@ -69,7 +73,13 @@ runs: 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 }}" else error "Failed" "Cannot built the image ${{ inputs.image_name }}"