From 10859ce28eeaf43d58fc9057c4ae171b84ab6172 Mon Sep 17 00:00:00 2001 From: yenienserrano Date: Fri, 24 Nov 2023 16:54:45 +0100 Subject: [PATCH] Revert "Update build tar.gz slim action" This reverts commit 8cc41a7dd44644d7dc2d83ac3eca8cdacc088678. --- .github/workflows/build.yml | 43 +++++++++++++------------------------ 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 251163902811..8c6d17454276 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,27 +3,22 @@ name: Build on: - workflow_dispatch: - inputs: - VERSION: - description: 'Wazuh dashboard version' - required: true - default: '4.9.0' - REVISION: - description: 'Wazuh dashboard revision' - required: true - default: '1' + workflow_dispatch + jobs: - build: + generate-linux-image: runs-on: ubuntu-latest - name: Build + name: Generate Linux image defaults: run: working-directory: ./artifacts strategy: matrix: - DISTRIBUTION: [ tar.gz ] - ARCHITECTURE: [ x64, arm64 ] + include: + - name: Linux x64 + ext: tar.gz + suffix: linux-x64 + script: build-platform --linux --skip-os-packages --release steps: - name: Checkout code @@ -60,25 +55,17 @@ jobs: - name: Get artifact build name run: | - echo "ARTIFACT_BUILD_NAME=wazuh-dashboard_${{ inputs.VERSION }}-${{ inputs.REVISION }}_${{ matrix.ARCHITECTURE }}_${{ github.sha }}.${{ matrix.DISTRIBUTION }}" >> $GITHUB_ENV + echo "ARTIFACT_BUILD_NAME=opensearch-dashboards-${{ env.VERSION }}-${{ matrix.suffix }}.${{ matrix.ext }}" >> $GITHUB_ENV - name: Run bootstrap - run: yarn osd bootstrap --allow-root - - - name: Build linux-x64 - if: matrix.ARCHITECTURE == 'x64' - run: yarn build-platform --linux --skip-os-packages --release - - - name: Build linux-arm64 - if: matrix.ARCHITECTURE == 'arm64' - run: yarn build-platform --linux-arm --skip-os-packages --release + run: yarn osd bootstrap - - name: Rename artifact - run: mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-${{ env.VERSION }}-linux-${{ matrix.ARCHITECTURE }}.${{ matrix.DISTRIBUTION }} /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} + - name: Build `${{ matrix.name }}` + run: yarn ${{ matrix.script }} --release - uses: actions/upload-artifact@v3 if: success() with: - name: wazuh-dashboard_${{ inputs.VERSION }}-${{ inputs.REVISION }}_${{ matrix.ARCHITECTURE }}_${{ github.sha }}.${{ matrix.DISTRIBUTION }} + name: ${{ matrix.suffix }}-${{ env.VERSION }} path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} - retention-days: 30 + retention-days: 30 \ No newline at end of file