From e0c8cf5fb2ca2aa1d6b93b2c81568546140d9a2b Mon Sep 17 00:00:00 2001 From: Ryan Wood Date: Tue, 8 Oct 2024 10:35:41 +0900 Subject: [PATCH] Modified pipeline to use explicit pre-commit version --- action.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 18ded0d..23d2133 100644 --- a/action.yml +++ b/action.yml @@ -5,10 +5,20 @@ inputs: description: options to pass to pre-commit run required: false default: '--all-files' + version: + description: pre-commit version + required: false + default: '' runs: using: composite 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 - run: python -m pip freeze --local shell: bash