27 lines
566 B
YAML
27 lines
566 B
YAML
name: pre-commit
|
|
|
|
on:
|
|
push:
|
|
branches: [main, stable]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
run-pre-commit:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.x
|
|
|
|
- name: Run pre-commit hooks
|
|
uses: pre-commit/action@v3.0.1
|
|
|
|
- name: Apply lite-action (auto-fix PR if needed)
|
|
uses: pre-commit-ci/lite-action@v1.1.0
|
|
if: ${{ !cancelled() }}
|