From 4a3e7841b07938721272fcd16a9ab2ba469c77b4 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Tue, 11 Aug 2026 11:07:31 +0100 Subject: [PATCH] Added workflow to update lockfiles in dependabot pull requests --- .github/workflows/dependabot-uv.yaml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/dependabot-uv.yaml diff --git a/.github/workflows/dependabot-uv.yaml b/.github/workflows/dependabot-uv.yaml new file mode 100644 index 0000000..3dfb743 --- /dev/null +++ b/.github/workflows/dependabot-uv.yaml @@ -0,0 +1,33 @@ +name: Dependabot uv update + +on: + pull_request: + paths: + - pyproject.toml + +permissions: + contents: write + +jobs: + update-lock: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Update uv.lock and requirements.txt + run: | + uv lock + uv export --output-file=requirements.txt + + - name: Commit and push changes + run: | + git config --global user.name "dependabot[bot]" + git config --global user.email "dependabot[bot]@users.noreply.github.com" + git add uv.lock requirements.txt + git diff --quiet && git diff --staged --quiet || (git commit -m "Update uv.lock and requirements.txt" && git push)