Skip to content

Dependabot on pre-commit hooks #77

Dependabot on pre-commit hooks

Dependabot on pre-commit hooks #77

Workflow file for this run

name: Dependabot on pre-commit hooks
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref_name }}
on:
schedule:
- cron: 13 2 * * 0 # weekly
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
- name: Set up Python
uses: actions/setup-python@v4.7.0
with:
cache: pip
cache-dependency-path: pyproject.toml
check-latest: true
python-version: 3.11
- name: Install deps
env:
PIP_UPGRADE: True
PIP_UPGRADE_STRATEGY: eager
run: python -m pip install -e ".[dev]"
- name: Autoupdate pre-commit
run: pre-commit autoupdate
- name: Pre-commit cache
id: cache-pre-commit
uses: actions/cache@v3.3.1
with:
key: ${{ hashFiles('.pre-commit-config.yaml') }}
path: ~/.cache/pre-commit
- name: Update pre-commit cache if needed
if: ${{ ! steps.cache-pre-commit.outputs.cache-hit }}
run: pre-commit install-hooks
- name: Open dependabot-like PR
uses: peter-evans/create-pull-request@v5.0.2
with:
author: "GitHub <noreply@github.com>"
base: ${{ github.ref_name }}
branch: dependabot/pre-commit/${{ github.ref_name }}
committer: "GitHub <noreply@github.com>"
commit-message: "chore(dev): bump pre-commit hooks"
labels: |
dependencies
pre-commit
title: "chore(dev): bump pre-commit hooks"