From b13972ce543cc628c7b87759b42493b4d4e0337b Mon Sep 17 00:00:00 2001 From: Malena Casas Date: Tue, 19 Nov 2024 16:04:38 -0300 Subject: [PATCH] Change inputs format --- .github/workflows/build.yml | 59 ++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9cfed6d4a381..032d120cdcace 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,45 +8,44 @@ on: workflow_dispatch: inputs: revision: - description: 'Set the value to "1" for packages in release format. - You can also add other values, such as issue numbers. - By default, it is set to "0" for development.' + description: "Revision number of the package." type: string default: "0" required: false upload: - description: "Upload ?" + description: "Enable to upload the packages to the S3 bucket." type: boolean default: false is_stage: - description: "Build package with release format. - By default: false" + description: "Enable to use the release naming nomenclature." type: boolean default: false distribution: - description: "Package format [tar, rpm, deb]" + description: "Distribution format of the package [tar, rpm, deb]." type: choice options: - - rpm - - deb - - tar - - rpm,deb - - rpm,tar - - deb,tar - - rpm,deb,tar - default: rpm,deb + - '[ "tar" ]' + - '[ "deb" ]' + - '[ "rpm" ]' + - '[ "tar", "deb" ]' + - '[ "tar", "rpm" ]' + - '[ "deb", "rpm" ]' + - '[ "tar", "deb", "rpm" ]' + default: '[ "deb", "rpm" ]' required: true architecture: - description: "Architecture of the package [x64, arm64]" + description: "Architecture of the package [x64, arm64]." type: choice options: - - x64 - - arm64 - - x64,arm64 - default: x64,arm64 + - '[ "x64" ]' + - '[ "arm64" ]' + - '[ "x64", "arm64" ]' + default: '[ "x64", "arm64" ]' required: true checksum: - description: "Generate package checksum?" + description: | + Enable to generate the MD5 checksums of the packages. + If the upload to the S3 bucket is enabled, these will be uploaded too. type: boolean default: false id: @@ -54,11 +53,11 @@ on: type: string required: false wazuh_plugins_ref: - description: "Branch, commit or tag for the wazuh-indexer-plugins repository" + description: "Branch, commit or tag for the wazuh-indexer-plugins repository." type: string default: "master" reporting_plugin_ref: - description: "Branch, commit or tag for the wazuh-indexer-reporting repository" + description: "Branch, commit or tag for the wazuh-indexer-reporting repository." type: string default: "master" workflow_call: @@ -121,17 +120,11 @@ jobs: steps: - id: setup run: | - # Asignar las entradas a variables - distribution="${{ inputs.distribution }}" - architecture="${{ inputs.architecture }}" - - # Generar el JSON utilizando jq matrix=$(jq -cn \ - --argjson distribution "$(echo $distribution | jq -R 'split(",")')" \ - --argjson architecture "$(echo $architecture | jq -R 'split(",")')" \ - '{distribution: $distribution, architecture: $architecture}') - - # Guardar el resultado en GITHUB_OUTPUT + --argjson distribution '${{ inputs.distribution }}' \ + --argjson architecture '${{ inputs.architecture }}' \ + '{distribution: $distribution, architecture: $architecture}' + ) echo "matrix=$matrix" >> $GITHUB_OUTPUT build-wazuh-plugins: