feat(maibot): 添加 MaiBot 动作控制 API 和 WebUI #293
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ruff | |
| on: [ push, pull_request ] | |
| jobs: | |
| ruff-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Format Code | |
| run: uv run ruff format . | |
| - name: Lint Code | |
| run: uv run ruff check . | |
| # - name: Commit and Push Changes (Optional) # 自动格式化后提交并推送更改 | |
| # if: github.event_name == 'push' # 仅在 Push 时提交更改 | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # run: | | |
| # # 配置 Git 用户信息 | |
| # git config --global user.name "github-actions[bot]" | |
| # git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| # # 检查是否有格式化修改 | |
| # if git diff --quiet; then | |
| # echo "No changes to commit." | |
| # else | |
| # # 提交并推送格式化后的代码 | |
| # git add . | |
| # git commit -m "Auto-format code via Ruff" | |
| # git push origin HEAD:$GITHUB_REF | |
| # fi |