From 4777247583be7a1bcaef2a800e623b22cc2f3ecc Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Tue, 1 Aug 2023 16:11:24 -0700 Subject: [PATCH] Change to regex in install dashboard gha to handle generic version format Signed-off-by: Ryan Liang --- .github/actions/install-dashboards/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/install-dashboards/action.yml b/.github/actions/install-dashboards/action.yml index 77555f326..bf621008d 100644 --- a/.github/actions/install-dashboards/action.yml +++ b/.github/actions/install-dashboards/action.yml @@ -39,8 +39,8 @@ runs: - id: osd-version run: | - echo "::set-output name=osd-version::$(cat package.json | jq '.opensearchDashboards.version' | cut -c 2-4)" - echo "::set-output name=osd-x-version::$(cat package.json | jq '.opensearchDashboards.version' | cut -c 2-3)" + echo "::set-output name=osd-version::$(jq -r '.opensearchDashboards.version' package.json)" + echo "::set-output name=osd-x-version::$(jq -r '.opensearchDashboards.version | split(".") | .[:2] | join(".")' package.json)" working-directory: ${{ steps.determine-plugin-directory.outputs.plugin-directory }} shell: bash