Skip to content

Pre-commit auto-update #26

Pre-commit auto-update

Pre-commit auto-update #26

name: Pre-commit auto-update
on:
workflow_dispatch:
schedule:
- cron: 0 0 1 * * # every first of the month
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit autoupdate
run: pre-commit autoupdate
- uses: crazy-max/ghaction-import-gpg@v5
name: Import GPG key
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: update/pre-commit-autoupdate
delete-branch: true
title: Auto-update pre-commit hooks
committer: Johann Christensen <[email protected]>
commit-message: Auto-update pre-commit hooks
body: |
Update versions of tools in pre-commit
configs to latest version
labels: dependencies
reviewers: juhannc