25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
feat(workflow): 添加同步到 CNB 的工作流
二丫讲梵8e5eac9eab8c
diff --git a/.github/workflows/docker-dev.yml b/.github/workflows/docker-dev.ymlindex 0b93fc5bdf..ab6f75979a 100644--- a/.github/workflows/docker-dev.yml+++ b/.github/workflows/docker-dev.yml@@ -3,6 +3,10 @@ name: Docker Devon:workflow_dispatch:+env:+ CNB_REPOSITORY: "dbxio.com/dbx"+ CNB_REGISTRY: "docker.cnb.cool"+jobs:docker:runs-on: ubuntu-latest@@ -25,6 +29,13 @@ jobs:username: ${{ secrets.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}+ - name: Login to CNB Registry+ uses: docker/login-action@v3+ with:+ registry: ${{ env.CNB_REGISTRY }}+ username: cnb+ password: ${{ secrets.CNB_TOKEN }}+- name: Build and push by digestid: builduses: docker/build-push-action@v6@@ -32,7 +43,9 @@ jobs:context: .file: deploy/Dockerfileplatforms: ${{ matrix.platform }}- outputs: type=image,name=${{ secrets.DOCKERHUB_USERNAME }}/dbx,push-by-digest=true,name-canonical=true,push=true+ outputs: |+ type=image,name=${{ secrets.DOCKERHUB_USERNAME }}/dbx,push-by-digest=true,name-canonical=true,push=true+ type=image,name=${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }},push-by-digest=true,name-canonical=true,push=truecache-from: type=gha,scope=${{ matrix.platform }}-devcache-to: type=gha,scope=${{ matrix.platform }}-dev,mode=max@@ -70,9 +83,20 @@ jobs:username: ${{ secrets.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}+ - name: Login to CNB Registry+ uses: docker/login-action@v3+ with:+ registry: ${{ env.CNB_REGISTRY }}+ username: cnb+ password: ${{ secrets.CNB_TOKEN }}+- name: Create manifest list and pushworking-directory: /tmp/digestsrun: |docker buildx imagetools create \-t ${{ secrets.DOCKERHUB_USERNAME }}/dbx:dev \$(printf '${{ secrets.DOCKERHUB_USERNAME }}/dbx@sha256:%s ' *)++ docker buildx imagetools create \+ -t ${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}:dev \+ $(printf '${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}@sha256:%s ' *)diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 4144744590..1327cd3365 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -8,6 +8,11 @@ on:permissions:contents: write+env:+ CNB_REPOSITORY: "dbxio.com/dbx"+ CNB_USERNAME: "cnb"+ CNB_REGISTRY: "docker.cnb.cool"+jobs:bump-jdbc-plugin-version:runs-on: ubuntu-latest@@ -302,6 +307,29 @@ jobs:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}run: gh release edit ${{ github.ref_name }} --repo ${{ github.repository }} --draft=false --prerelease+ sync-release-to-cnb:+ name: Sync release to CNB+ needs: publish+ runs-on: ubuntu-latest+ steps:+ - name: Sync release assets to CNB+ env:+ TAG_NAME: ${{ github.ref_name }}+ GITHUB_REPOSITORY: ${{ github.repository }}+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ CNB_TOKEN: ${{ secrets.CNB_TOKEN }}+ run: |+ set -euo pipefail++ wget -q https://cnb.cool/znb/mpgrm/-/releases/download/v0.1.0/mpgrm_linux_amd64.tar.gz+ tar -xf mpgrm_linux_amd64.tar.gz+ chmod +x mpgrm++ ./mpgrm releases sync \+ --repo "https://github.com/${GITHUB_REPOSITORY}.git" \+ --target-repo "https://cnb.cool/${CNB_REPOSITORY}.git" \+ --tags "${TAG_NAME}"+docker:runs-on: ubuntu-lateststrategy:@@ -323,6 +351,13 @@ jobs:username: ${{ secrets.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}+ - name: Login to CNB Registry+ uses: docker/login-action@v3+ with:+ registry: ${{ env.CNB_REGISTRY }}+ username: cnb+ password: ${{ secrets.CNB_TOKEN }}+- name: Build and push by digestid: builduses: docker/build-push-action@v6@@ -330,7 +365,9 @@ jobs:context: .file: deploy/Dockerfileplatforms: ${{ matrix.platform }}- outputs: type=image,name=${{ secrets.DOCKERHUB_USERNAME }}/dbx,push-by-digest=true,name-canonical=true,push=true+ outputs: |+ type=image,name=${{ secrets.DOCKERHUB_USERNAME }}/dbx,push-by-digest=true,name-canonical=true,push=true+ type=image,name=${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }},push-by-digest=true,name-canonical=true,push=truecache-from: type=gha,scope=${{ matrix.platform }}cache-to: type=gha,scope=${{ matrix.platform }},mode=max@@ -368,6 +405,13 @@ jobs:username: ${{ secrets.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}+ - name: Login to CNB Registry+ uses: docker/login-action@v3+ with:+ registry: ${{ env.CNB_REGISTRY }}+ username: cnb+ password: ${{ secrets.CNB_TOKEN }}+- name: Extract version from tagid: versionrun: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"@@ -379,3 +423,8 @@ jobs:-t ${{ secrets.DOCKERHUB_USERNAME }}/dbx:${{ steps.version.outputs.version }} \-t ${{ secrets.DOCKERHUB_USERNAME }}/dbx:latest \$(printf '${{ secrets.DOCKERHUB_USERNAME }}/dbx@sha256:%s ' *)++ docker buildx imagetools create \+ -t ${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}:${{ steps.version.outputs.version }} \+ -t ${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}:latest \+ $(printf '${{ env.CNB_REGISTRY }}/${{ env.CNB_REPOSITORY }}@sha256:%s ' *)diff --git a/.github/workflows/sync-to-cnb.yml b/.github/workflows/sync-to-cnb.ymlnew file mode 100644index 0000000000..c84b0a14cc--- /dev/null+++ b/.github/workflows/sync-to-cnb.yml@@ -0,0 +1,34 @@+name: Sync to CNB++on:+ push:+ branches:+ - main+ tags:+ - "**"+ delete:+ workflow_dispatch:++env:+ CNB_REPOSITORY: "dbxio.com/dbx"+ CNB_USERNAME: "cnb"++jobs:+ sync:+ name: Sync repository to CNB+ runs-on: ubuntu-latest+ steps:+ - name: Checkout repository+ uses: actions/checkout@v4+ with:+ fetch-depth: 0++ - name: Push to CNB mirror+ env:+ CNB_TOKEN: ${{ secrets.CNB_TOKEN }}+ run: |+ set -euo pipefail++ git remote add cnb "https://${CNB_USERNAME}:${CNB_TOKEN}@cnb.cool/${CNB_REPOSITORY}.git"+ git push cnb --all --force+ git push cnb --tags --forcediff --git a/plugins/jdbc/manifest.json b/plugins/jdbc/manifest.jsonindex ed44ac5b3c..fafb4d44f3 100644--- a/plugins/jdbc/manifest.json+++ b/plugins/jdbc/manifest.json@@ -1,7 +1,7 @@{"id": "jdbc","name": "DBX JDBC Plugin",- "version": "0.1.14",+ "version": "0.1.15","protocol_version": 1,"description": "Adds optional JDBC driver support to DBX.","executable": "bin/dbx-jdbc-plugin",diff --git a/plugins/jdbc/pom.xml b/plugins/jdbc/pom.xmlindex 4de855f3be..1914b30aef 100644--- a/plugins/jdbc/pom.xml+++ b/plugins/jdbc/pom.xml@@ -4,7 +4,7 @@<modelVersion>4.0.0</modelVersion><groupId>app.dbx</groupId><artifactId>dbx-jdbc-plugin</artifactId>- <version>0.1.14</version>+ <version>0.1.15</version><properties><maven.compiler.source>17</maven.compiler.source>