-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add scheduled workflow to update pre-commit hooks (#29)
- Loading branch information
Showing
2 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Updates | ||
|
||
on: | ||
# every Sunday | ||
schedule: | ||
- cron: '14 3 * * 0' | ||
# on demand | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pre-commit: | ||
name: "Update pre-commit hooks and run them on all files" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
- run: rustup update stable | ||
- run: cargo install cargo-sort@1.0.9 | ||
- run: pip install pre-commit | ||
- run: pre-commit autoupdate | ||
- run: pre-commit run --all-files | ||
- uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: chore/update-pre-commit-hooks | ||
title: "chore: update pre-commit hooks" | ||
commit-message: "chore: update pre-commit hooks" | ||
body: Update pre-commit hooks to latest version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters