Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ inputs:
description: Cache hook environments (~/.cache/pre-commit) between runs.
required: false
default: 'true'
install-only:
description: >-
Install the binary onto PATH (and optionally cache) but skip the
`pre-commit run` step. For workflows that drive pre-commit themselves
(diff-scoped runs, `install-hooks` cache seeding, custom log capture).
required: false
default: 'false'

runs:
using: composite
Expand Down Expand Up @@ -89,5 +96,6 @@ runs:
key: go-pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit
if: inputs.install-only != 'true'
shell: bash
run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
Loading