Skip to content

Updating Pre-commit configuration on seyLu/reusable-workflows #14

Updating Pre-commit configuration on seyLu/reusable-workflows

Updating Pre-commit configuration on seyLu/reusable-workflows #14

name: Auto-update Pre-commit
run-name: Updating Pre-commit configuration on ${{ github.repository }}
on:
schedule:
- cron: '0 0 * * 0' # Run every Sunday at midnight UTC
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
jobs:
auto_update:
name: Perform auto-update of pre-commit configuration
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- name: Harden Runner
uses: step-security/harden-runner@0c6ab70129fa3660acd9cd2b51e8685d619cd613 # v2.5.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install and upgrade PIP
run: python -m pip install --upgrade pip
- name: Install Pre-commit
run: pip install pre-commit
- name: Update pre-commit hooks
run: pre-commit autoupdate
- name: Create PR
uses: peter-evans/create-pull-request@d806186ee3288c60a352af9852b6b18afbbfd87e # v5.0.2
with:
token: ${{ secrets.SEYLUBOT_PAT }}
committer: GitHub <noreply@github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
signoff: false
delete-branch: true