Skip to content

Run pre-commit on all files #216

Run pre-commit on all files

Run pre-commit on all files #216

# Copyright (C) 2020 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license
name: Run pre-commit on all files
on:
pull_request:
push:
schedule:
- cron: '0 16 * * 5' # Every Friday at 16:00
jobs:
run_pre_commit:
name: Run pre-commit on all files
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up Python 3.10
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
with:
python-version: '3.10'
- name: Install pre-commit
run: |-
pip install \
--disable-pip-version-check \
--user \
--no-warn-script-location \
pre-commit
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
- name: Install pre-commit hooks
run: |-
pre-commit install --install-hooks
- name: Run pre-commit on all files
run: |-
pre-commit run --all-files