Update Dashboard Dependency #877
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: Update Dashboard Dependency | |
| on: | |
| workflow_run: | |
| workflows: | |
| - Publish WebUI Dist | |
| types: | |
| - completed | |
| branches: | |
| - dev | |
| schedule: | |
| - cron: "17 * * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: update-dashboard-dependency-dev | |
| cancel-in-progress: false | |
| jobs: | |
| update-dev-dependency: | |
| if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout dev | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: dev | |
| fetch-depth: 0 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Check PyPI latest dashboard dev package | |
| run: | | |
| uv run --no-project --with packaging --with tomlkit python .github/scripts/update_dashboard_dependency.py | |
| - name: Commit dependency update | |
| run: | | |
| set -euo pipefail | |
| if git diff --quiet -- pyproject.toml requirements.txt; then | |
| echo "没有发现 dashboard dev 依赖更新" | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add pyproject.toml requirements.txt | |
| git commit -m "chore: 更新 dashboard dev 依赖" | |
| git pull --rebase origin dev | |
| git push origin HEAD:dev |