Detect outdated pre-commit hooks #202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |