Skip to content

Commit

Permalink
Update Build manual Github action (#6195)
Browse files Browse the repository at this point in the history
  • Loading branch information
yenienserrano authored Dec 7, 2023
1 parent f5dbad2 commit 10f26fb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- name: Step 01 - Download the plugin's source code
uses: actions/checkout@v3
with:
repository: wazuh/wazuh-dashboard-plugins
ref: ${{ inputs.reference }}
path: wazuh

Expand Down Expand Up @@ -107,11 +108,16 @@ jobs:
cd /home/node/kbn/plugins/${{ matrix.plugins.container_path }} && yarn && ${{ inputs.command }};
'
- name: Get the plugin version
run: |
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
- name: Step 04 - Upload artifact to GitHub
if: ${{ inputs.artifact_name && inputs.artifact_path }}
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact_name }}
name: ${{ inputs.artifact_name }}_${{ env.version }}-${{ env.revision }}_${{ inputs.reference }}.zip
path: ${{ matrix.plugins.path }}/${{ inputs.artifact_path }}
if-no-files-found: 'error'

Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
name: Manual build

on:
workflow_call:
inputs:
reference:
required: true
type: string
default: master
description: Source code reference (branch, tag or commit SHA)
workflow_dispatch:
inputs:
reference:
Expand All @@ -20,7 +27,7 @@ jobs:
name: Build app package
uses: ./.github/workflows/dev-environment.yml
with:
reference: ${{ github.event.inputs.reference }}
reference: ${{ inputs.reference }}
command: 'yarn build'
artifact_name: 'wazuh-package'
artifact_name: 'wazuh-dashboard-plugins'
secrets: inherit

0 comments on commit 10f26fb

Please sign in to comment.