Skip to content

Detect outdated pre-commit hooks #202

Detect outdated pre-commit hooks

Detect outdated pre-commit hooks #202

# Copyright (C) 2021 Sebastian Pipping <[email protected]>
# Licensed under the MIT License
name: Detect outdated pre-commit hooks
on:
schedule:
- cron: '0 16 * * 5' # Every Friday 4pm
jobs:
pip_detect_outdated:
name: Detect outdated pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up Python 3.9
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install pre-commit
run: |-
pip install \
--disable-pip-version-check \
--no-warn-script-location \
--user \
pre-commit
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
- name: Check for outdated hooks (and fail if any)
run: |-
pre-commit autoupdate
git diff --exit-code -- .pre-commit-config.yaml