Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: frontend commit ID (#15545)

Danny Xu098844badaf4
diff --git a/.github/workflows/build-push-ci-image-depot.yml b/.github/workflows/build-push-ci-image-depot.yml
deleted file mode 100644
index b2a262a81f..0000000000
--- a/.github/workflows/build-push-ci-image-depot.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-name: Build and push CI image
-
-on:
- workflow_dispatch:
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-jobs:
- docker:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Extract build args
- run: |
- echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- - uses: pnpm/action-setup@v4
- with:
- version: '10.6.2'
- - uses: actions/setup-node@v4
- with:
- node-version: '22.14.0'
- cache: pnpm
- cache-dependency-path: "frontend/pnpm-lock.yaml"
- - run: pnpm install --frozen-lockfile
- working-directory: frontend
- - name: Run pnpm release build
- run: |
- cp backend/enterprise/api/plan.yaml frontend/src/types
- cp backend/component/iam/permission.yaml frontend/src/types/iam
- pnpm --dir ./frontend i && pnpm --dir ./frontend release
- - name: Login to DockerHub
- uses: docker/login-action@v3
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- - uses: depot/setup-action@v1
- - name: Build and push
- id: docker_build
- uses: depot/build-push-action@v1
- with:
- context: .
- project: ${{ secrets.DEPOT_PROJECT}}
- token: ${{ secrets.DEPOT_TOKEN }}
- file: scripts/Dockerfile.depot
- platforms: linux/amd64,linux/arm64
- push: true
- tags: bytebase/bytebase:release-ci
- build-args: |
- RELEASE=release
- VERSION_SUFFIX=-release-ci
- GIT_COMMIT=${{ env.GITHUB_SHA }}
- - name: Image digest
- run: echo "Successfully pushed bytebase/bytebase:release-ci " ${{ steps.docker_build.outputs.digest }}
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index ba4ad51836..01616b9d7a 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -12,15 +12,8 @@ import Components from "unplugin-vue-components/vite";
import { defineConfig } from "vite";
const SERVER_PORT = parseInt(process.env.PORT ?? "3000", 10) ?? 3000;
-const HTTPS_PORT = 443;
const LOCAL_ENDPOINT = "http://localhost:8080";
-// NOTE: the following lines is to solve https://github.com/gitpod-io/gitpod/issues/6719
-// tl;dr : the HMR(hot module replacement) will behave differently when VPN is on, and by manually set its port to 443 should prevent this issue.
-const IS_RUNNING_GITPOD =
- process.env["GITPOD_WORKSPACE_ID"] !== null &&
- process.env["GITPOD_WORKSPACE_ID"] !== undefined;
-
const extractHostPort = (url: string) => {
const parsed = new URL(url);
return parsed.host;
@@ -94,7 +87,7 @@ export default defineConfig({
},
},
hmr: {
- port: IS_RUNNING_GITPOD ? HTTPS_PORT : SERVER_PORT,
+ port: SERVER_PORT,
},
},
resolve: {
@@ -107,7 +100,7 @@ export default defineConfig({
},
dedupe: ["vscode"],
},
- envPrefix: "BB_",
+ envPrefix: ["BB_", "GIT_COMMIT"],
define: {
_global: {},
},