Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ yarn-error.log*
# Data directories (PostgreSQL, Redis persistent data)
data/redis
data/postgres
data/redis-dev
data/postgres-dev

# Documentation submodule (not needed in container)
docs-site
4 changes: 3 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies and format code
- name: Install dependencies, type check, and format code
run: |
bun install
bun run typecheck
bun run format
bun run lint

- name: Commit formatted code
run: |
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,15 @@ jobs:
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
uses: oven-sh/setup-bun@v2

- name: Install dependencies and format code
- name: Install dependencies, type check, and format code
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
run: |
bun install
bun run typecheck
bun run format

- name: Commit VERSION and formatted code
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
run: |
# 配置git
git config user.name "github-actions[bot]"
Expand All @@ -226,22 +227,22 @@ jobs:
fi

- name: Create and push tag
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
run: |
NEW_TAG="${{ steps.next_version.outputs.new_tag }}"
git tag -a "$NEW_TAG" -m "Release $NEW_TAG"
git push origin HEAD:main "$NEW_TAG"

- name: Prepare image names
id: image_names
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
run: |
GHCR_IMAGE=$(echo "ghcr.io/${{ github.repository_owner }}/claude-code-hub" | tr '[:upper:]' '[:lower:]')

echo "ghcr_image=${GHCR_IMAGE}" >> "$GITHUB_OUTPUT"

- name: Create GitHub Release
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.next_version.outputs.new_tag }}
Expand All @@ -263,7 +264,7 @@ jobs:

# 自清理旧的tags和releases(保持最近50个) - 仅清理正式版本
- name: Cleanup old tags and releases
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && steps.next_version.outputs.is_prerelease != 'true'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && steps.next_version.outputs.is_prerelease != 'true' && success()
continue-on-error: true
env:
TAGS_TO_KEEP: 50
Expand Down Expand Up @@ -364,23 +365,23 @@ jobs:

# Docker构建步骤
- name: Set up QEMU
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
if: steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && success()
uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -402,7 +403,7 @@ jobs:

# 同步 main 分支到 dev 分支 (rebase dev onto main) - 仅正式版本触发
- name: Sync main to dev branch
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && steps.next_version.outputs.is_prerelease != 'true'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && steps.next_version.outputs.is_prerelease != 'true' && success()
id: sync_dev
continue-on-error: true
env:
Expand Down Expand Up @@ -480,7 +481,7 @@ jobs:

# 如果同步失败(冲突),触发 autofix workflow
- name: Trigger autofix for sync conflicts
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && steps.sync_dev.outputs.sync_status == 'conflict'
if: (steps.check.outputs.needs_bump == 'true' || github.event_name == 'workflow_dispatch') && steps.sync_dev.outputs.sync_status == 'conflict' && success()
env:
GH_TOKEN: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
run: |
Expand Down
5 changes: 2 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
```bash
# Development
bun install # Install dependencies
bun run dev # Start dev server (port 13500)
bun run dev # Run tsgo preflight, then start dev server (port 13500)

# Build & Production
bun run build # Build for production (copies VERSION to standalone)
bun run build # Run tsgo preflight, then build for production
bun run start # Start production server

# Quality Checks
bun run typecheck # Type check with tsgo (faster)
bun run typecheck:tsc # Type check with tsc
bun run lint # Lint with Biome
bun run lint:fix # Auto-fix lint issues
bun run format # Format code
Expand Down
1 change: 1 addition & 0 deletions drizzle/0085_busy_ken_ellis.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "system_settings" ADD COLUMN "codex_priority_billing_source" varchar(20) DEFAULT 'requested' NOT NULL;
Loading
Loading