Replace legacy Go project with Rust Bedrock bootstrap

This commit is contained in:
2026-11-29 23:33:11 +08:00
parent fa79b1e6ce
commit 59f2ef1bf2
140 changed files with 17 additions and 24124 deletions
-47
View File
@@ -1,47 +0,0 @@
# 仅 main 的相关路径变更触发发布;工作分支验证不应运行此生产切换。
name: Deploy Bedrock
on:
push:
branches: [main]
paths:
- 'cmd/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
- 'deploy/**'
- 'db/**'
- '.gitea/workflows/deploy.yml'
# 发布串行排队且不取消正在进行的路由/数据库操作。
concurrency:
group: foundry-core-main-deploy
cancel-in-progress: false
jobs:
deploy:
if: gitea.ref == 'refs/heads/main' && gitea.event_name == 'push'
runs-on: ces-control
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
# 在远程 runner 生成无 CGO 二进制,供只读 slim 容器执行。
- name: Verify and build
run: |
set -eu
test -z "$(gofmt -l cmd internal)"
go test -mod=readonly ./...
CGO_ENABLED=0 go build -mod=readonly -o bin/bedrock ./cmd/bedrock
# secrets 仅注入进程环境,项目/引导 JSON 来自 Actions Variables,release 再检查内容。
- name: Deploy and verify backend readiness
env:
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }}
SLACK_CLIENT_SECRET: ${{ secrets.SLACK_CLIENT_SECRET }}
FOUNDRY_PROJECTS: ${{ vars.FOUNDRY_PROJECTS }}
FOUNDRY_ONBOARDING: ${{ vars.FOUNDRY_ONBOARDING }}
run: bash deploy/release.sh bin/bedrock