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 }}