File tree Expand file tree Collapse file tree 2 files changed +17
-46
lines changed Expand file tree Collapse file tree 2 files changed +17
-46
lines changed Original file line number Diff line number Diff line change 99 branches :
1010 - master
1111
12- workflow_run : # chain from the uv-lock workflow
13- workflows : ["uv.lock on Dependabot PRs"]
14- types : [completed]
12+ permissions :
13+ contents : write
14+ pull-requests : write
1515
1616jobs :
1717 build :
18- # Only run if not a Dependabot PR, or once uv-lock has completed successfully
19- if : |
20- github.event_name == 'workflow_run' ||
21- github.actor != 'dependabot[bot]'
2218 runs-on : ubuntu-latest
2319 strategy :
2420 matrix :
3026 uses : astral-sh/setup-uv@v6
3127 with :
3228 python-version : ${{ matrix.python }}
29+ # refresh lock only for Dependabot PRs
30+ - name : Refresh uv.lock (Dependabot only)
31+ if : |
32+ github.event_name == 'pull_request' &&
33+ github.actor == 'dependabot[bot]'
34+ run : |
35+ uv lock
36+ if ! git diff --quiet -- uv.lock; then
37+ git config user.name "github-actions[bot]"
38+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+ git add uv.lock
40+ git commit -m "chore: refresh uv.lock"
41+ git push || echo "push skipped (no perms)"
42+ fi
3343 - name : Install dependencies
3444 run : |
3545 uv sync --locked --only-dev
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments