Skip to content

Commit

Permalink
Change inputs format
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasas993 committed Nov 19, 2024
1 parent 38b4c35 commit b13972c
Showing 1 changed file with 26 additions and 33 deletions.
59 changes: 26 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,56 @@ 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:
description: "ID used to identify the workflow uniquely."
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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b13972c

Please sign in to comment.