Skip to content

Commit

Permalink
CI: add bot to update lockfile on dependabot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
superlopuh committed Dec 16, 2024
1 parent 9abcad1 commit 03b455d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/update-bot.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/update-lockfile-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Update Lockfile Bot

on:
workflow_dispatch:
pull_request:
branches:
- 'dependabot/**'

permissions:
contents: write
pull-requests: write

jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python
run: uv python install 3.12

- name: Update lockfile
run: |
echo "\`\`\`" > uv_output.md
XDSL_VERSION_OVERRIDE="0+dynamic" make venv &>> uv_output.md
echo "\`\`\`" >> uv_output.md
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add uv.lock
git commit -m "Update uv lockfile" -F uv_output.md || echo "No changes to commit"
git push

0 comments on commit 03b455d

Please sign in to comment.