Skip to content

fix: docs and precommits #655

fix: docs and precommits

fix: docs and precommits #655

Workflow file for this run

name: Lint
on:
pull_request_target:
branches:
- master
- externalAPI
jobs:
matrix:
runs-on: ubuntu-latest
name: Run ${{ matrix.checks }}
strategy:
matrix:
checks:
- pyupgrade
- black
- check-executables-have-shebangs
- check-json
- requirements-txt-fixer
- check-ast
- mixed-line-ending
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
token: ${{ secrets.PAT }}
- name: Set up Python
uses: actions/setup-python@v5
id: python
with:
python-version: "3.x"
- name: Install pre-commit
run: |
python3 -m pip install pre-commit
pre-commit install-hooks --config .github/pre-commit-config.yaml
- name: Run the check (${{ matrix.checks }})
run: pre-commit run --hook-stage manual ${{ matrix.checks }} --all-files --config .github/pre-commit-config.yaml
- name: Commit Changes
if: failure()
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "fix: ${{ matrix.checks }} action"