Skip to content

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

chore: build bytebase-demo (#16839)

Danny Xu3aae957383af
diff --git a/.github/workflows/build-push-demo-image.yml b/.github/workflows/build-push-demo-image.yml
new file mode 100644
index 0000000000..d86c22fc9f
--- /dev/null
+++ b/.github/workflows/build-push-demo-image.yml
@@ -0,0 +1,51 @@
+name: Build and Push Demo Image to GAR
+
+on:
+ workflow_dispatch:
+
+env:
+ GCP_PROJECT_ID: bytebase-saas-prod
+ GAR_LOCATION: us-central1
+ GAR_REPOSITORY: bytebase
+ IMAGE_NAME: bytebase-demo
+
+jobs:
+ build-and-push:
+ runs-on: depot-ubuntu-24.04-4
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Extract build args
+ run: |
+ echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
+
+ - name: Set up Cloud SDK
+ uses: google-github-actions/setup-gcloud@v2
+ with:
+ project_id: ${{ env.GCP_PROJECT_ID }}
+
+ - name: Authenticate to Google Cloud
+ uses: google-github-actions/auth@v2
+ with:
+ credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
+
+ - name: Configure Docker for Artifact Registry
+ run: |
+ gcloud auth configure-docker ${{ env.GAR_LOCATION }}-docker.pkg.dev
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Build and push Docker image
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ file: scripts/Dockerfile
+ push: true
+ tags: |
+ ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GAR_REPOSITORY }}/${{ env.IMAGE_NAME }}:latest
+ build-args: |
+ VERSION=cloud
+ GIT_COMMIT=${{ env.GIT_COMMIT }}
+ RELEASE=dev
\ No newline at end of file