use strictly python 3.12 #6
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: Check .lock | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - "pyproject.toml" | |
| - ".github/workflows/lock.yml" | |
| permissions: | |
| contents: write | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Verify uv.lock is up to date | |
| run: | | |
| cp uv.lock uv.lock.before | |
| uv lock | |
| if ! diff -q uv.lock.before uv.lock >/dev/null 2>&1; then | |
| echo "uv.lock is outdated. Regenerating and committing..." | |
| git config user.name "${{ secrets.RUFF_USERNAME }}" | |
| git config user.email "${{ secrets.RUFF_EMAIL }}" | |
| git add uv.lock | |
| git commit -m "Regenerate uv.lock" | |
| else | |
| echo "uv.lock is up to date." | |
| fi | |
| - name: Push changes | |
| run: | | |
| git push |