Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Autoupdate pre-commit

on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
Comment thread
ndgrigorian marked this conversation as resolved.
Outdated
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '28 2 * * 6' # Saturday at 02:28 UTC
workflow_dispatch:

permissions: read-all

jobs:
autoupdate:
name: Autoupdate

runs-on: ubuntu-latest
timeout-minutes: 10

permissions:
# Needed to create a PR with autoupdate changes
contents: write
pull-requests: write

steps:
- name: Checkout mkl-service repo
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4.2.2
Comment thread
ndgrigorian marked this conversation as resolved.
Outdated

- name: Set up python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v5.6.0
Comment thread
ndgrigorian marked this conversation as resolved.
Outdated
with:
python-version: '3.13'
Comment thread
ndgrigorian marked this conversation as resolved.
Outdated

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit autoupdate
run: pre-commit autoupdate

- name: Create a PR with autoupdate changes
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 #v8.1.0
Comment thread
ndgrigorian marked this conversation as resolved.
Outdated
with:
commit-message: 'chore: update pre-commit hooks'
add-paths: .pre-commit-config.yaml
branch: 'bot/pre-commit-autoupdate'
delete-branch: true
title: Weekly pre-commit autoupdate
body: |
This PR updates the `.pre-commit-config.yaml` using `pre-commit autoupdate`.
labels: autoupdate
Comment thread
ndgrigorian marked this conversation as resolved.
Loading