From 2bd0b86138bb5190a727e26780cc35db89ac8364 Mon Sep 17 00:00:00 2001 From: Rupal Mahajan Date: Fri, 2 Dec 2022 19:08:53 +0000 Subject: [PATCH] Update setup node for linux Signed-off-by: Rupal Mahajan --- .../dashboards-reports-test-and-build-workflow.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dashboards-reports-test-and-build-workflow.yml b/.github/workflows/dashboards-reports-test-and-build-workflow.yml index f221f2f3..ed22a83a 100644 --- a/.github/workflows/dashboards-reports-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-reports-test-and-build-workflow.yml @@ -23,10 +23,15 @@ jobs: ref: ${{ env.OPENSEARCH_VERSION }} path: dashboards-reports/OpenSearch-Dashboards - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: "10.24.1" + - 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: ${{ 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 }}