Build: Migrate to uv for dependency management #1
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: Sync requirements.txt | |
| on: | |
| push: | |
| paths: | |
| - 'uv.lock' | |
| - 'pyproject.toml' | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: astral-sh/setup-uv@v4 | |
| - name: Generate requirements.txt | |
| run: uv export --no-hashes --format requirements-txt > qa/requirements.txt | |
| - name: Commit if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add qa/requirements.txt | |
| if git diff --staged --quiet; then | |
| echo "No changes to qa/requirements.txt" | |
| else | |
| git commit -m "Sync qa/requirements.txt from uv.lock" | |
| git push | |
| fi |