-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.23 KB
/
python-precommit-updater.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Python Pre-commit updater
on:
workflow_call:
secrets:
GH_TOKEN:
required: true
inputs:
CACHE_DEPENDENCY_PATH:
required: false
default: requirements.txt
type: string
PYTHON_VERSION:
required: false
default: '3.x'
type: string
permissions:
contents: read
jobs:
auto-update:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ inputs.PYTHON_VERSION }}
cache: pip
cache-dependency-path: ${{ inputs.CACHE_DEPENDENCY_PATH }}
- name: Install pre-commit
run: pip install pre-commit
- name: Updated Hooks
run: pre-commit autoupdate
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GH_TOKEN }}
branch: update/pre-commit-autoupdate
title: ⬆️Update pre-commit hooks
commit-message: ⬆️updated pre-commit hooks
body: ✨Update versions of tools in pre-commit configs to latest version
labels: pre-commit✨