-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 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,44 @@ | ||
name: update pre-commit hooks versions | ||
|
||
on: | ||
schedule: | ||
- cron: "51 5 * * 1" # every monday morning | ||
workflow_dispatch: # manual trigger | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
report: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: python set up | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
|
||
- name: python cache set up | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-py-cache | ||
|
||
- name: install pre-commit | ||
run: | | ||
pip install pre-commit | ||
- name: run pre-commit autoupdate | ||
run: | | ||
pre-commit autoupdate | ||
- name: commit changes if any | ||
run: | | ||
if [[ $(git status --porcelain) ]]; then | ||
git config --global user.name 'Torben' | ||
git config --global user.email '59419684+entorb@users.noreply.github.com' | ||
git commit -am "Update .pre-commit-config.yaml" | ||
git push | ||
fi |