Skip to content

Commit

Permalink
add step to fetch correct node version
Browse files Browse the repository at this point in the history
Signed-off-by: David Cui <[email protected]>
  • Loading branch information
davidcui1225 committed Apr 18, 2022
1 parent 99b75ea commit 07e1a5e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ jobs:
ref: ${{ env.OPENSEARCH_VERSION }}
path: dashboards-reports/OpenSearch-Dashboards

- name: Get node version
id: versions_step
run:
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "14.18.2"
node-version: ${{ steps.versions_step.outputs.node_version }}
registry-url: 'https://registry.npmjs.org'


- name: Move Dashboards Reports to Plugins Dir
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
Expand Down

0 comments on commit 07e1a5e

Please sign in to comment.