lkeep/.github/workflows/lint.yaml

47 lines
1.2 KiB
YAML
Raw Normal View History

name: Lint project
on:
push:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache pre-commit hooks
id: cache-pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-cache
restore-keys: |
${{ runner.os }}-pre-commit-cache
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==2.0.0
poetry install
poetry run pre-commit install
- name: Lint pre-commit
run: poetry run pre-commit run --all-files --hook-stage manual
- name: Run Telegram Notify Action
uses: proDreams/actions-telegram-notifier@main
if: always()
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
status: ${{ job.status }}
message: "Github Lkeep Lint"
notify_fields: "actor,repository,workflow"