Skip to content

Commit 806f332

Browse files
authored
Update pre-commit automatic update (#1896)
1 parent d35bbbf commit 806f332

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/pre-commit-autoupdate.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: '0 0 * * *'
66
workflow_dispatch:
77

8+
env:
9+
FORCE_COLOR: 1
10+
811
jobs:
912
auto-update:
1013
name: Update pre-commit hooks
@@ -16,11 +19,26 @@ jobs:
1619
steps:
1720
- uses: actions/checkout@v4
1821

19-
- uses: actions/setup-python@v5.1.0
22+
- uses: actions/setup-python@v5
2023
with:
24+
cache: pip
2125
python-version: '3.12'
2226

23-
- uses: browniebroke/[email protected]
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install pre-commit
30+
31+
- name: Use pre-commit environment cache
32+
uses: actions/cache@v3
33+
with:
34+
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
35+
path: ~/.cache/pre-commit
36+
restore-keys: ${{ runner.os }}-pre-commit-
37+
38+
- name: Run pre-commit automatic update
39+
run: |
40+
pre-commit autoupdate
41+
pre-commit run --all-files
2442
2543
- uses: peter-evans/[email protected]
2644
with:

0 commit comments

Comments
 (0)