Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to run uv lock #5422

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Comment on lines +21 to +22
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- name: Checkout without token
uses: actions/checkout@v4
if: ${{ env.GH_PAT == '' }}
Comment on lines +24 to +26
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this fallback in case the secret isn't accessible, which unfortunately the case sometimes...


- 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.