-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from ecmwf-actions/feat/precommit-qa
Reusable workflow for precommit hook runs
- Loading branch information
Showing
2 changed files
with
171 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: '[QA] Run pre-commit hooks' | ||
|
||
on: | ||
|
||
# Allow the workflow to be reusable | ||
workflow_call: | ||
inputs: | ||
# Inputs for pre-commit hooks action. | ||
python-version: | ||
description: The version of Python binary to use. | ||
required: false | ||
default: '3.x' | ||
type: string | ||
skip-hooks: | ||
description: A list of pre-commit hooks to skip. | ||
required: false | ||
default: '' | ||
type: string | ||
|
||
jobs: | ||
pre-commit-run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- name: Run pre-commit hooks | ||
uses: pre-commit/[email protected] | ||
env: | ||
SKIP: ${{ inputs.skip-hooks }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters