fix: Address typo in reusable workflows #43
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
# Workflow for pre-commit hooks using GitHub Actions | |
name: pre-commit-hooks | |
on: | |
pull_request: | |
branches: | |
- "main" # Only for pull requests targeting the main branch | |
push: | |
branches: | |
- "main" # Also trigger on direct pushes to the main branch (e.g. merges) | |
jobs: | |
pre-commit: | |
name: Lint code and README files | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the branch | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Configure the workflow's environment | |
- name: Install pre-commit hooks | |
run: | | |
# Install pre-commit framework | |
pip install pre-commit | |
# Install command Line Interface for MarkdownLint as required for markdownlint hook | |
npm install -g markdownlint-cli | |
# Install all hooks defined in the '.pre-commit-config.yaml' file | |
pre-commit install | |
# Run all hooks defined in the ".pre-commit-config.yaml" file | |
- name: Run pre-commit | |
run: pre-commit run --all-files --show-diff-on-failure |