Skip to content

Commit 94d9a36

Browse files
authored
Merge pull request #153 from IntelPython/add-pre-commit-auto-update
[MAINT] Add pre-commit auto-update workflow
2 parents 196d2a3 + ab8528e commit 94d9a36

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Autoupdate pre-commit
2+
3+
on:
4+
workflow_dispatch:
5+
# To guarantee Maintained check is occasionally updated. See
6+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
7+
schedule:
8+
- cron: '28 2 * * 6' # Saturday at 02:28 UTC
9+
10+
permissions: read-all
11+
12+
jobs:
13+
autoupdate:
14+
name: Autoupdate
15+
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
19+
permissions:
20+
# Needed to create a PR with autoupdate changes
21+
contents: write
22+
pull-requests: write
23+
24+
steps:
25+
- name: Checkout mkl-service repo
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
28+
- name: Set up python
29+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
30+
with:
31+
python-version: '3.14'
32+
33+
- name: Install pre-commit
34+
run: pip install pre-commit
35+
36+
- name: Run pre-commit autoupdate
37+
run: pre-commit autoupdate
38+
39+
- name: Create a PR with autoupdate changes
40+
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
41+
with:
42+
commit-message: 'chore: update pre-commit hooks'
43+
add-paths: .pre-commit-config.yaml
44+
branch: 'bot/pre-commit-autoupdate'
45+
delete-branch: true
46+
title: Weekly pre-commit autoupdate
47+
body: |
48+
This PR updates the `.pre-commit-config.yaml` using `pre-commit autoupdate`.
49+
labels: autoupdate

0 commit comments

Comments
 (0)