From 06d8ec14a76144222639a9c9c2ed7c060c40b874 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Wed, 11 Sep 2024 09:14:20 -0300 Subject: [PATCH] Fix name and BRANCH_NAME parameter --- .github/workflows/Puppet_module_builder.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Puppet_module_builder.yml b/.github/workflows/Puppet_module_builder.yml index 22f50548..26d18c02 100644 --- a/.github/workflows/Puppet_module_builder.yml +++ b/.github/workflows/Puppet_module_builder.yml @@ -1,13 +1,14 @@ -run-name: Build Wazuh Puppet module ${{ inputs.WAZUH_VERSION }} +run-name: Build Wazuh Puppet module ${{ inputs.BRANCH_NAME }} name: Puppet Module Builder on: workflow_dispatch: inputs: - WAZUH_VERSION: - description: "Wazuh Version" + BRANCH_NAME: + type: string + description: "Branch or tag name" required: true - default: v4.10.0 + default: "v4.10.0" UPLOAD_S3: type: choice description: "Upload Puppet module to S3" @@ -32,10 +33,12 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ inputs.BRANCH_NAME }} - - name: + - name: Verify Tag name run: | - WAZUH_TAG=$(curl --silent https://api.github.com/repos/wazuh/wazuh/git/refs/tags | grep '["]ref["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 11- | grep ^v${{ inputs.WAZUH_VERSION }}$) + WAZUH_TAG=$(curl --silent https://api.github.com/repos/wazuh/wazuh/git/refs/tags | grep '["]ref["]:' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 11- | grep ^${{ inputs.BRANCH_NAME }}$) echo "WAZUH_TAG=$WAZUH_TAG" >> "$GITHUB_ENV" - name: Install dependencies