Skip to content
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
30 changes: 30 additions & 0 deletions .github/workflows/prek_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Prek Auto Update

on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install prek
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.10/prek-installer.sh | sh
- name: Run Update
run: prek autoupdate
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.PREK_UPDATE_TOKEN }}
commit-message: "Bump prek hooks"
branch: prek-autoupdate
delete-branch: true
title: "Bump prek hooks"
body: "Automated update of prek hooks via `prek autoupdate`."
labels: |
dependencies
skip-changelog
7 changes: 7 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ jobs:
uses: Swatinem/rust-cache@v2.9.1
- name: Run cargo fmt
run: cargo fmt --all -- --check
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: j178/prek-action@v2
env:
SKIP: no-commit-to-branch
test:
name: Tests
strategy:
Expand Down
16 changes: 0 additions & 16 deletions .pre-commit-config.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[repos]]
repo = "builtin"
hooks = [
{ id = "check-added-large-files" },
{ id = "check-toml" },
{ id = "check-yaml" },
{ id = "end-of-file-fixer" },
{ id = "no-commit-to-branch" },
{ id = "trailing-whitespace" },
]

[[repos]]
repo = "https://github.com/doublify/pre-commit-rust"
rev = "v1.0"
hooks = [
{ id = "fmt" }
]