Skip to content

armgit / dbx

Public Imported from GitHub
0

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。

ci: skip unaffected jobs via paths-filter

t8y23e8c4273b2bb
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3abd59076a..a94f6d388a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,6 +15,8 @@ env:
jobs:
frontend:
+ needs: changes
+ if: needs.changes.outputs.frontend == 'true'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
@@ -46,6 +48,8 @@ jobs:
run: pnpm publish:dry-run
rust:
+ needs: changes
+ if: needs.changes.outputs.rust == 'true'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
@@ -82,6 +86,8 @@ jobs:
run: cargo test --workspace --locked
jdbc:
+ needs: changes
+ if: needs.changes.outputs.jdbc == 'true'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
@@ -110,31 +116,39 @@ jobs:
changes:
runs-on: ubuntu-22.04
outputs:
+ frontend: ${{ steps.filter.outputs.frontend }}
+ rust: ${{ steps.filter.outputs.rust }}
+ jdbc: ${{ steps.filter.outputs.jdbc }}
agents: ${{ steps.filter.outputs.agents }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- - name: Detect agent changes
+ - name: Detect changed areas
+ uses: dorny/paths-filter@v3
id: filter
- shell: bash
- env:
- BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
- run: |
- if [ -z "$BASE_SHA" ] || echo "$BASE_SHA" | grep -Eq '^0+$' || ! git rev-parse --verify "$BASE_SHA^{commit}" >/dev/null 2>&1; then
- if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
- BASE_SHA="HEAD^"
- else
- BASE_SHA="$(git hash-object -t tree /dev/null)"
- fi
- fi
-
- if git diff --name-only "$BASE_SHA" HEAD -- agents/ | grep -q .; then
- echo "agents=true" >> "$GITHUB_OUTPUT"
- else
- echo "agents=false" >> "$GITHUB_OUTPUT"
- fi
+ with:
+ filters: |
+ frontend:
+ - 'apps/desktop/**'
+ - 'packages/**'
+ - 'pnpm-lock.yaml'
+ - 'package.json'
+ - '.oxfmtrc.json'
+ - 'scripts/run-check.mjs'
+ - '.github/workflows/ci.yml'
+ rust:
+ - 'crates/**'
+ - 'src-tauri/**'
+ - 'Cargo.toml'
+ - 'Cargo.lock'
+ - 'rust-toolchain*'
+ - '.github/workflows/ci.yml'
+ jdbc:
+ - 'plugins/jdbc/**'
+ agents:
+ - 'agents/**'
agents:
needs: changes