From d1e21b686ccbe42fa5dd7491122857a009fb0e1c Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Thu, 6 Jun 2024 14:29:31 -0700 Subject: [PATCH] gh-actions: Add git sha to frontend build --- .github/workflows/ui-deploy.yml | 1 + packages/frontend/src/config/config.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ui-deploy.yml b/.github/workflows/ui-deploy.yml index 8dba98278d..26f4e18169 100644 --- a/.github/workflows/ui-deploy.yml +++ b/.github/workflows/ui-deploy.yml @@ -67,6 +67,7 @@ jobs: REACT_APP_DISABLED_ROUTES_NO_LIQUIDITY_WARNING_MESSAGE: ${{ vars.REACT_APP_DISABLED_ROUTES_NO_LIQUIDITY_WARNING_MESSAGE }} REACT_APP_BLOCKLIST_ENABLED: ${{ vars.REACT_APP_BLOCKLIST_ENABLED }} REACT_APP_BNC_DAPP_ID: ${{ secrets.REACT_APP_BNC_DAPP_ID }} + REACT_APP_GIT_SHA: ${{ github.sha }} run: pnpm --filter frontend... build - name: Write commit file diff --git a/packages/frontend/src/config/config.ts b/packages/frontend/src/config/config.ts index ac0c4d573f..4eccf3dab9 100644 --- a/packages/frontend/src/config/config.ts +++ b/packages/frontend/src/config/config.ts @@ -1,7 +1,7 @@ import { providers } from 'ethers' export const showBannerMessage = process.env.REACT_APP_SHOW_BANNER_MESSAGE ?? '' -export const gitRevision = process.env.REACT_APP_GIT_SHA ?? '' +export const gitRevision = (process.env.REACT_APP_GIT_SHA ?? '')?.slice(0, 7) // show rewards header nav route let showRewards = true