From 2a09ae92de1d820c24cf9904dd1a91dd1cc201d6 Mon Sep 17 00:00:00 2001 From: Nicolas Agustin Guevara Pihen Date: Fri, 29 Nov 2024 14:27:54 -0300 Subject: [PATCH] Apply reference name change --- .github/workflows/dev-environment.yml | 5 +++-- .github/workflows/manual-build.yml | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dev-environment.yml b/.github/workflows/dev-environment.yml index bad08f81bd..a58e23a2fe 100644 --- a/.github/workflows/dev-environment.yml +++ b/.github/workflows/dev-environment.yml @@ -118,8 +118,9 @@ jobs: cd /home/node/kbn/plugins/${{ matrix.plugins.container_path }} && yarn && ${{ inputs.command }}; ' - - name: Get the plugin version + - name: Get the plugin version and and format reference name run: | + echo "githubReference=$(echo ${{ inputs.reference }} | sed 's/\//-/g')" >> $GITHUB_ENV echo "version=$(jq -r '.version' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV echo "revision=$(jq -r '.revision' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV @@ -127,7 +128,7 @@ jobs: if: ${{ inputs.artifact_name && inputs.artifact_path }} uses: actions/upload-artifact@v3 with: - name: ${{ inputs.artifact_name }}_${{ env.version }}-${{ env.revision }}_${{ inputs.reference }}.zip + name: ${{ inputs.artifact_name }}_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip path: ${{ matrix.plugins.path }}/${{ inputs.artifact_path }} if-no-files-found: 'error' diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 4452e637dd..0db921fdff 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -45,8 +45,9 @@ jobs: ref: ${{ inputs.reference }} path: wazuh - - name: Step 02 - Get version and revision + - name: Step 02 - Set variables run: | + echo "githubReference=$(echo ${{ inputs.reference }} | sed 's/\//-/g')" >> $GITHUB_ENV echo "currentDir=$(pwd -P)" >> $GITHUB_ENV echo "version=$(jq -r '.version' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV echo "revision=$(jq -r '.revision' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV @@ -55,8 +56,8 @@ jobs: - name: Step 03 - Download the plugin's source code uses: actions/download-artifact@v3 with: - name: wazuh-dashboard-plugins_${{ env.version }}-${{ env.revision }}_${{ inputs.reference }}.zip - path: ${{ env.currentDir }}/wazuh/scripts/test-packages/wazuh-dashboard-plugins_${{ env.version }}-${{ env.revision }}_${{ inputs.reference }}.zip + name: wazuh-dashboard-plugins_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip + path: ${{ env.currentDir }}/wazuh/scripts/test-packages/wazuh-dashboard-plugins_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip - name: Step 04 - Build the Docker image run: |