Skip to content

Update

Update #18

Workflow file for this run

name: Update
on:
schedule:
- cron: "51 5 * * 1" # Every Monday morning
workflow_dispatch: # Manual trigger
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Python set up
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Update dev tools
run: |
uv remove --dev pre-commit pytest pytest-cov ruff
uv add --dev pre-commit pytest pytest-cov ruff
- name: Run Ruff
run: |
uv run ruff format
uv run ruff check --fix
- name: Run pre-commit autoupdate
run: |
uv run pre-commit autoupdate
- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.1
- name: Commit changes if any
run: |
if [[ $(git status --porcelain) ]]; then
git config --local user.name "GitHub Action"
git config --local user.email "action@github.com"
git add .pre-commit-config.yaml
git commit -m "Update .pre-commit-config.yaml" || true
git add uv.lock
git commit -m "Update Lock" || true
git add pyproject.toml
git commit -m "Update pyproject.toml" || true
git push
fi