Update pre-commit config #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a scheduled workflow to keep pre-commit config up to date | |
name: Update pre-commit config | |
on: | |
schedule: | |
# Runs at 00:00 UTC on the 1st of every month | |
- cron: '0 0 1 * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
update: | |
permissions: | |
contents: write # for peter-evans/create-pull-request to create branch | |
pull-requests: write # for peter-evans/create-pull-request to create a PR | |
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: '3.11' | |
- name: Install pre-commit | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade pre-commit | |
pre-commit install | |
- name: Update pre-commit config | |
run: | | |
pre-commit autoupdate | |
pre-commit uninstall | |
- name: Sync `dev-requirements.txt` | |
run: | | |
python .github/workflows/update-dev-requirements.py | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 | |
with: | |
commit-message: "chore: update pre-commit config" | |
title: "chore: update pre-commit config" | |
branch: chore-precommit-config | |
delete-branch: true | |
author: GitHub <[email protected]> |