Skip to content

pre-commit autoupdate #40

pre-commit autoupdate

pre-commit autoupdate #40

name: pre-commit autoupdate
on:
workflow_dispatch:
schedule:
- cron: "0 6 4 * *"
defaults:
run:
shell: bash -el {0}
jobs:
check_update:
name: Check if newer version exists
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# We need to checkout with SSH here to have actions run on the PR.
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up pixi
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
environments: default lint
- name: Update pre-commit hooks and run
id: versions
run: |
pixi run pre-commit-update
pixi run pre-commit-run --color=always --show-diff-on-failure || true
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
with:
commit-message: "Auto-update pre-commit hooks"
title: "Auto-update pre-commit hooks"
body: |
New versions of the used pre-commit hooks were detected.
This PR updates them to the latest and already ran `pre-commit run -a` for you to fix any changes in formatting.
branch: pre-commit-autoupdate
delete-branch: true