mirror of
https://github.com/pre-commit/action.git
synced 2025-11-07 18:56:55 +00:00
Modified pipeline to use explicit pre-commit version
This commit is contained in:
parent
f7acafac02
commit
e0c8cf5fb2
1 changed files with 11 additions and 1 deletions
12
action.yml
12
action.yml
|
|
@ -5,10 +5,20 @@ inputs:
|
||||||
description: options to pass to pre-commit run
|
description: options to pass to pre-commit run
|
||||||
required: false
|
required: false
|
||||||
default: '--all-files'
|
default: '--all-files'
|
||||||
|
version:
|
||||||
|
description: pre-commit version
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- run: python -m pip install pre-commit
|
- id: Install pre-commit (latest)
|
||||||
|
if: ${{ inputs.version == '' }}
|
||||||
|
run: python -m pip install pre-commit
|
||||||
|
shell: bash
|
||||||
|
- id: Install pre-commit ${{ inputs.version }}
|
||||||
|
if: ${{ inputs.version != '' }}
|
||||||
|
run: python -m pip install pre-commit==${{ inputs.version }}
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: python -m pip freeze --local
|
- run: python -m pip freeze --local
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue