Skip to content

Pre-commit auto-update #24

Pre-commit auto-update

Pre-commit auto-update #24

name: Pre-commit auto-update
on:
workflow_dispatch:
schedule:
- cron: "30 5 1 * *" # Update monthly on the first day of the month at 5:30am UTC
jobs:
auto-update:
name: Auto update pre-commit
runs-on: ubuntu-latest
env:
app_id: ${{ secrets.APP_ID }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.11"
- name: Generate token
id: generate_token
uses: tibdex/[email protected]
with:
app_id: ${{ env.app_id }}
private_key: ${{ env.app_private_key }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit autoupdate
run: pre-commit autoupdate
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
branch: update/pre-commit/autoupdate
title: Auto-update pre-commit hooks
commit-message: Auto-update pre-commit hooks
body: Bump versions of pre-commit tools to latest version
labels: Pre-commit
token: ${{ steps.generate_token.outputs.token }}
assignees: ${{ secrets.DEFAULT_UPDATE_ASSIGNEE }}