Skip to content

Commit

Permalink
Add workflow to run uv lock (cookiecutter#5422)
Browse files Browse the repository at this point in the history
* Add workflow to keep uv.lock up to date

Should do the job for dependabot updates

* Only run uv lock workflow when GH_PAT is set

* Make a change to pyproject.toml

* Attempt to fix workflow syntax

* Attempt to fix workflow syntax

* Regenerate uv.lock
  • Loading branch information
browniebroke authored Oct 7, 2024
1 parent f590d14 commit 3252aa7
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 39 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/dependabot-uv-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: uv

on:
pull_request:
paths:
- "pyproject.toml"

permissions:
contents: write
pull-requests: write

jobs:
lock:
runs-on: ubuntu-latest
env:
GH_PAT: ${{ secrets.GH_PAT }}
steps:
- name: Checkout with token
uses: actions/checkout@v4
if: ${{ env.GH_PAT != '' }}
with:
token: ${{ env.GH_PAT }}

- name: Checkout without token
uses: actions/checkout@v4
if: ${{ env.GH_PAT == '' }}

- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- run: uv lock
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Regenerate uv.lock
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ line-length = 119
target-version = [
'py312',
]

# ==== isort ====

[tool.isort]
Expand Down
78 changes: 39 additions & 39 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3252aa7

Please sign in to comment.