Skip to content

update pre-commit hooks #52

update pre-commit hooks

update pre-commit hooks #52

name: update pre-commit hooks
on:
schedule:
- cron: '*/5 3 * * *'
jobs:
update-template:
if: github.repository == 'alan-turing-institute/python-project-template'
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install pre-commit
run: pip install pre-commit
- name: Update pre-commit hooks
run: |
cd project_template
pre-commit autoupdate
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
add_options: '-u'
commit_message: 'chore: update pre-commit hooks'