From c44e053fa952ceaf0a60aa622a6f8c4bf5943a8e Mon Sep 17 00:00:00 2001 From: Anna Szczech Date: Tue, 28 Jan 2025 12:24:28 +0100 Subject: [PATCH] add version --- .github/workflows/pr-automation.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml index 8b8d7cf32e..a95f47f7b2 100644 --- a/.github/workflows/pr-automation.yml +++ b/.github/workflows/pr-automation.yml @@ -74,6 +74,7 @@ jobs: outputs: ACCOUNTS: ${{ steps.accounts.outputs.ACCOUNTS }} TESTMO_RUN_ID: ${{ steps.init-testmo.outputs.testmo-run-id }} + DASHBOARD_VERSION: ${{ steps.build-dashboard.outputs.DASHBOARD_VERSION }} runs-on: ubuntu-22.04 needs: initialize-cloud permissions: @@ -123,7 +124,13 @@ jobs: STATIC_URL: / IS_CLOUD_INSTANCE: true ONBOARDING_USER_JOINED_DATE_THRESHOLD: ${{ vars.STAGING_ONBOARDING_USER_JOINED_DATE_THRESHOLD }} - run: npm run build + run: | + npm run build + # Extract version from package.json + VERSION=$(node -p "require('./package.json').version") + echo "VERSION=$VERSION" + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "DASHBOARD_VERSION=$VERSION" >> $GITHUB_OUTPUT - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v3 @@ -202,7 +209,7 @@ jobs: PW_RETRIES: ${{ vars.PW_RETRIES }} ACCOUNTS: ${{ needs.deploy-dashboard.outputs.ACCOUNTS }} E2E_ENCODE_PASS: ${{ secrets.E2E_ENCODE_PASS }} - DASHBOARD_VERSION: "3.20.0" + DASHBOARD_VERSION: ${{ needs.deploy-dashboard.outputs.DASHBOARD_VERSION }} BRANCH_NAME: ${{ github.ref}} SALEOR_CLOUD_SERVICE: ${{ steps.cloud_variables.outputs.SALEOR_CLOUD_SERVICE }}