Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Build manual Github action #6195

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading