Skip to content

Commit

Permalink
Revert "Update build tar.gz slim action"
Browse files Browse the repository at this point in the history
This reverts commit 8cc41a7.
  • Loading branch information
yenienserrano committed Nov 24, 2023
1 parent 8cc41a7 commit 10859ce
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 10859ce

Please sign in to comment.