8000 Fixed pre-commit CI workflow · ravngr/github-workflows@1c6e32f · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c6e32f

Browse files
committed
Fixed pre-commit CI workflow
Added input for specific Python version
1 parent 26356dd commit 1c6e32f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/pre-commit.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
on:
44
workflow_call:
5+
inputs:
6+
python-version:
7+
description: 'Python environment version'
8+
default: '3.11'
9+
required: false
10+
type: string
511

612

713
jobs:
@@ -12,9 +18,15 @@ jobs:
1218
- name: "Checkout repository"
1319
uses: actions/checkout@v3
1420

21+
- name: "Setup Python"
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "${{ inputs.python-version }}"
25+
cache: 'pip'
26+
1527
- name: "Install pre-commit"
1628
run: |
17-
python -m pip install pre-commit
29+
pip install pre-commit
1830
1931
- name: "Cache pre-commit environment"
2032
uses: actions/cache@v3

0 commit comments

Comments
 (0)
0