Auto-backup data and configs
Browse filesFiles changed (5)
- .gitattributes+1
- .github/workflows/build.ymlAdded+111
- .github/workflows/docker-publish.ymlAdded+68
- data/database.dbAdded+3
- docker-compose.ymlAdded+19
57 unmodified lines58596057 unmodified lines# Video files - compressed*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -text57 unmodified lines5859606157 unmodified lines# Video files - compressed*.mp4 filter=lfs diff=lfs merge=lfs -text*.webm filter=lfs diff=lfs merge=lfs -textdata/database.db filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111name: Multi-platform Build Release
on: push: tags: - "v*" workflow_dispatch: inputs: version: description: "Version tag, for example v1.0.0" required: false default: "dev"
jobs: build: name: Build ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - os: windows-latest source_name: codex-console.exe asset_name: codex-console-windows-x64.exe - os: ubuntu-latest source_name: codex-console asset_name: codex-console-linux-x64 - os: macos-latest source_name: codex-console asset_name: codex-console-macos-arm64
steps: - name: Checkout code uses: actions/checkout@v4
- name: Setup Python 3.11 uses: actions/setup-python@v5 with: python-version: "3.11" cache: "pip"
- name: Install dependencies run: | pip install -r requirements.txt pyinstaller
- name: Build binary run: | pyinstaller codex_register.spec --clean --noconfirm
- name: Rename packaged binary shell: bash run: | mv "dist/${{ matrix.source_name }}" "dist/${{ matrix.asset_name }}"
- name: Upload build artifact uses: actions/upload-artifact@v4 with: name: ${{ matrix.asset_name }} path: dist/${{ matrix.asset_name }} if-no-files-found: error
release: name: Create release needs: build runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') permissions: contents: write
steps: - name: Checkout code uses: actions/checkout@v4
- name: Download all artifacts uses: actions/download-artifact@v4 with: path: dist/ merge-multiple: true
- name: Create GitHub release uses: softprops/action-gh-release@v2 with: files: dist/* generate_release_notes: true body: | ## codex-console
### Download | Platform | File | |------|------| | Windows x64 | `codex-console-windows-x64.exe` | | Linux x64 | `codex-console-linux-x64` | | macOS ARM64 | `codex-console-macos-arm64` |
### Usage ```bash # Linux/macOS may need execute permission first chmod +x codex-console-*
# Start Web UI ./codex-console
# Custom port ./codex-console --port 8080
# Debug mode ./codex-console --debug
# Set Web UI password ./codex-console --access-password mypassword ```1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768name: Docker Image CI
on: push: branches: [ "master", "main" ] # 当发布新版本时触发 tags: [ 'v*.*.*' ] pull_request: branches: [ "master", "main" ]
env: # GitHub Container Registry 的地址 REGISTRY: ghcr.io # 镜像名称,默认为 GitHub 用户名/仓库名 IMAGE_NAME: ${{ github.repository }}
jobs: build-and-push-image: runs-on: ubuntu-latest permissions: contents: read packages: write # 如果需要签名生成的镜像,可以使用 id-token: write
steps: - name: Checkout repository uses: actions/checkout@v4
# 设置 Docker Buildx 用于构建多平台镜像 (可选) - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3
# 登录到 Docker 镜像仓库 # 如果只是在 PR 中测试构建,则跳过登录 - name: Log in to the Container registry if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}
# 提取 Docker 镜像的元数据(标签、注释等) - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=schedule type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha type=raw,value=latest,enable={{is_default_branch}}
# 构建并推送 Docker 镜像 - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max123version https://git-lfs.github.com/spec/v1oid sha256:e92eb66c217748a240f5ce234d22798c1d19cdcd7f2d82497a1e18f7fb0a3897size 12697612345678910111213141516171819version: '3.8'
services: webui: build: . ports: - "1455:1455" environment: - WEBUI_HOST=0.0.0.0 - WEBUI_PORT=1455 - DEBUG=0 - LOG_LEVEL=info # 如果需要访问密码,可以在这里取消注释并设置 - WEBUI_ACCESS_PASSWORD=admin123 volumes: # 挂载数据目录以持久化数据库和日志 - ./data:/app/data - ./logs:/app/logs restart: unless-stopped.gitattributes+1
.github/workflows/build.ymlAdded+111
.github/workflows/docker-publish.ymlAdded+68
data/database.dbAdded+3
docker-compose.ymlAdded+19