File tree 2 files changed +23
-25
lines changed
2 files changed +23
-25
lines changed Original file line number Diff line number Diff line change @@ -64,23 +64,22 @@ jobs:
64
64
with :
65
65
path : OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin
66
66
67
- - name : Get node and yarn versions
68
- id : versions_step
69
- run : |
70
- echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
71
- echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
72
-
73
- - name : Setup node
74
- uses : actions/setup-node@v1
67
+ - name : Setup Node
68
+ uses : actions/setup-node@v3
75
69
with :
76
- node-version : ${{ steps.versions_step.outputs.node_version }}
70
+ node-version-file : ' ./OpenSearch-Dashboards/.nvmrc '
77
71
registry-url : ' https://registry.npmjs.org'
78
72
79
- - name : Install correct yarn version for OpenSearch Dashboards
73
+ - name : Install Yarn
74
+ # Need to use bash to avoid having a windows/linux specific step
75
+ shell : bash
80
76
run : |
81
- npm uninstall -g yarn
82
- echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
83
- npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}
77
+ YARN_VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').engines.yarn")
78
+ echo "Installing yarn@$YARN_VERSION"
79
+ npm i -g yarn@$YARN_VERSION
80
+
81
+ - run : node -v
82
+ - run : yarn -v
84
83
85
84
- name : Bootstrap the plugin
86
85
run : |
Original file line number Diff line number Diff line change @@ -26,21 +26,20 @@ jobs:
26
26
repository : opensearch-project/OpenSearch-Dashboards
27
27
ref : ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
28
28
path : OpenSearch-Dashboards
29
- - name : Get node and yarn versions
30
- id : versions_step
31
- run : |
32
- echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
33
- echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
34
- - name : Setup node
35
- uses : actions/setup-node@v1
29
+ - name : Setup Node
30
+ uses : actions/setup-node@v3
36
31
with :
37
- node-version : ${{ steps.versions_step.outputs.node_version }}
32
+ node-version-file : ' ./OpenSearch-Dashboards/.nvmrc '
38
33
registry-url : ' https://registry.npmjs.org'
39
- - name : Install correct yarn version for OpenSearch Dashboards
34
+ - name : Install Yarn
35
+ # Need to use bash to avoid having a windows/linux specific step
36
+ shell : bash
40
37
run : |
41
- npm uninstall -g yarn
42
- echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
43
- npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}
38
+ YARN_VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').engines.yarn")
39
+ echo "Installing yarn@$YARN_VERSION"
40
+ npm i -g yarn@$YARN_VERSION
41
+ - run : node -v
42
+ - run : yarn -v
44
43
- name : Checkout Anomaly Detection OpenSearch Dashboards plugin
45
44
uses : actions/checkout@v2
46
45
with :
You can’t perform that action at this time.
0 commit comments