fix: CI 无 DB 下 clippy 通过 + 失败时也发飞书通知
Some checks failed
Secrets CLI - Build & Release / 探测 Runner (push) Successful in 1s
Secrets CLI - Build & Release / Build (aarch64-apple-darwin) (push) Has been skipped
Secrets CLI - Build & Release / Build (x86_64-unknown-linux-musl) (push) Has been skipped
Secrets CLI - Build & Release / 版本 & Release (push) Successful in 2s
Secrets CLI - Build & Release / 质量检查 (fmt / clippy / test) (push) Successful in 34s
Secrets CLI - Build & Release / 发布草稿 Release (push) Has been cancelled
Secrets CLI - Build & Release / 通知 (push) Has been cancelled
Secrets CLI - Build & Release / Build (x86_64-pc-windows-msvc) (push) Has been cancelled

- update.rs: sqlx::query! 改为 query/query_as,不依赖编译期 DB
- workflow: build job 加 always() 且 check.result==success,失败时 notify 能执行

Made-with: Cursor
This commit is contained in:
voson
2026-03-18 15:50:10 +08:00
parent c1d86bc96d
commit c61c8292aa
2 changed files with 22 additions and 13 deletions

View File

@@ -228,7 +228,7 @@ jobs:
build-linux:
name: Build (x86_64-unknown-linux-musl)
needs: [version, probe-runners, check]
if: needs.probe-runners.outputs.has_linux == 'true'
if: always() && needs.check.result == 'success' && needs.probe-runners.outputs.has_linux == 'true'
runs-on: debian
timeout-minutes: 1
steps:
@@ -277,7 +277,7 @@ jobs:
build-macos:
name: Build (aarch64-apple-darwin)
needs: [version, probe-runners, check]
if: needs.probe-runners.outputs.has_macos == 'true'
if: always() && needs.check.result == 'success' && needs.probe-runners.outputs.has_macos == 'true'
runs-on: darwin-arm64
timeout-minutes: 1
steps:
@@ -324,7 +324,7 @@ jobs:
build-windows:
name: Build (x86_64-pc-windows-msvc)
needs: [version, probe-runners, check]
if: needs.probe-runners.outputs.has_windows == 'true'
if: always() && needs.check.result == 'success' && needs.probe-runners.outputs.has_windows == 'true'
runs-on: windows
timeout-minutes: 1
steps: