File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 77 branches :
88 - " *"
99env :
10- OPENSEARCH_DASHBOARDS_VERSION : ' main'
1110 ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
1211
1312jobs :
2322 os : [ ubuntu-latest, macos-latest, windows-latest ]
2423 runs-on : ${{ matrix.os }}
2524 steps :
25+ - uses : actions/checkout@v4
26+ - name : Set env
27+ run : |
28+ opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version")
29+ major_version=$(echo $opensearch_version | cut -d. -f1)
30+ minor_version=$(echo $opensearch_version | cut -d. -f2)
31+ branch_version=${major_version}.${minor_version}
32+ opensearch_dashboards_branch=$branch_version
33+ if [ "$base_branch" = "main" ]; then
34+ opensearch_dashboards_branch=main
35+ fi
36+ echo "OPENSEARCH_DASHBOARDS_BRANCH=$opensearch_dashboards_branch" >> $GITHUB_ENV
2637 # Enable longer filenames for windows
2738 - name : Enable longer filenames
2839 if : ${{ matrix.os == 'windows-latest' }}
3142 uses : actions/checkout@v4
3243 with :
3344 repository : opensearch-project/OpenSearch-Dashboards
34- ref : ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
45+ ref : ${{ env.OPENSEARCH_DASHBOARDS_BRANCH }}
3546 path : OpenSearch-Dashboards
3647 - name : Setup Node
3748 uses : actions/setup-node@v3
Original file line number Diff line number Diff line change @@ -13,11 +13,23 @@ jobs:
1313 name : Run lint
1414 runs-on : ubuntu-latest
1515 steps :
16+ - uses : actions/checkout@v4
17+ - name : Set env
18+ run : |
19+ opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version")
20+ major_version=$(echo $opensearch_version | cut -d. -f1)
21+ minor_version=$(echo $opensearch_version | cut -d. -f2)
22+ branch_version=${major_version}.${minor_version}
23+ opensearch_dashboards_branch=$branch_version
24+ if [ "$base_branch" = "main" ]; then
25+ opensearch_dashboards_branch=main
26+ fi
27+ echo "OPENSEARCH_DASHBOARDS_BRANCH=$opensearch_dashboards_branch" >> $GITHUB_ENV
1628 - name : Checkout OpenSearch Dashboards
1729 uses : actions/checkout@v4
1830 with :
1931 repository : opensearch-project/OpenSearch-Dashboards
20- ref : ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
32+ ref : ${{ env.OPENSEARCH_DASHBOARDS_BRANCH }}
2133 path : OpenSearch-Dashboards
2234 - name : Setup Node
2335 uses : actions/setup-node@v3
You can’t perform that action at this time.
0 commit comments