Skip to content

Commit

Permalink
Evaluate all files in validation workflow (fix)
Browse files Browse the repository at this point in the history
This workflow was intended to run all files through pre-commit.
The input argument was not defined.
The input argument is now added as `additionalPreCommitArgs`
with a default value of `--all-files`.

https://pre-commit.com/\#pre-commit-run
'run all the hooks against all the files. This is a useful invocation if you are using pre-commit in CI.'
  • Loading branch information
arledesma committed Sep 29, 2023
1 parent f521e79 commit 7116a3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
required: false
type: string
default: ''
additionalPreCommitArgs:
description: options to pass to pre-commit run
required: false
type: string
default: '--all-files'
secrets:
GIT_TOKEN_BASIC:
required: false
Expand Down Expand Up @@ -62,7 +67,7 @@ jobs:
key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }}|${{ env.pythonLocation }}

- name: Run pre-commit validation
run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.args }}
run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.additionalPreCommitArgs }}
shell: bash

# -------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 7116a3b

Please sign in to comment.