ci: allow resolver job to commit uv lock

This commit is contained in:
Normann
2026-08-21 01:16:41 +02:00
parent e945462d78
commit 8711ad5e7b
+14 -1
View File
@@ -6,13 +6,15 @@ on:
- main - main
permissions: permissions:
contents: read contents: write
jobs: jobs:
lock: lock:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v7 - uses: actions/checkout@v7
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v7 - uses: actions/setup-python@v7
with: with:
python-version: "3.13.15" python-version: "3.13.15"
@@ -20,6 +22,17 @@ jobs:
run: python -m pip install --disable-pip-version-check uv run: python -m pip install --disable-pip-version-check uv
- name: Regenerate lockfile - name: Regenerate lockfile
run: uv lock run: uv lock
- name: Commit refreshed lockfile
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add uv.lock
if git diff --cached --quiet; then
echo "uv.lock already up to date"
else
git commit -m "build(deps): regenerate uv lock"
git push origin HEAD:${{ github.head_ref }}
fi
- name: Upload lockfile - name: Upload lockfile
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7
with: with: