From 03d075219b198a7c6bafa0bdc19a29a36dfe079f Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Mon, 14 Apr 2025 18:01:20 +0200 Subject: [PATCH] Actualiser action.yaml --- action.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index a3eea28..d5a8f16 100644 --- a/action.yaml +++ b/action.yaml @@ -13,6 +13,10 @@ inputs: description: 'should I add a tag corresponding to the version of the packaged software' required: false default: true + version_tag_prefix: + description: 'Prefix added to the version to build the version tag' + required: false + default: 'pmo' build_command: description: 'Command used to build the image (docker|podman)' required: false @@ -134,7 +138,12 @@ runs: if: inputs.add_version_tag == 'true' run: | source "${{ github.action_path }}/../bashlib.sh" - echo "IMAGE_TAGS=${{ env.IMAGE_TAGS }} pmo-${{ steps.get_version.outputs.version }}" >> $GITHUB_ENV + if [[ -n '${{ inputs.version_tag_prefix }}']] + prefix="${{ inputs.version_tag_prefix }}-" + else + prefix="" + fi + echo "IMAGE_TAGS=${{ env.IMAGE_TAGS }} ${prefix}${{ steps.get_version.outputs.version }}" >> $GITHUB_ENV - name: Build and tag image uses: https://gargoton.petite-maison-orange.fr/pmo-actions/build-image@main