-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (40 loc) · 1.42 KB
/
pre-commit-update.yml
File metadata and controls
48 lines (40 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Update .pre-commit-config.yaml
on:
schedule:
- cron: '0 3 * * 1' # Every Monday at 03:00 UTC
workflow_dispatch:
env:
HATCH_VERSION: "1.16.2"
jobs:
update-pre-commit-config:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
- name: Install Hatch
uses: pypa/hatch@install
with:
version: "${{ env.HATCH_VERSION }}"
- name: Update .pre-commit-config.yaml
run: hatch run pre-commit:pre-commit autoupdate --freeze
- name: Run pre-commit
run: hatch run pre-commit:run
- name: Create Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
commit-message: "chore(deps): Update .pre-commit-config.yaml"
title: "chore(deps): Update .pre-commit-config.yaml"
body: "Automated update of .pre-commit-config.yaml via scheduled workflow."
branch: "update/pre-commit-config-yaml"
base: ${{ github.ref_name }}
labels: "update"
reviewers: "linuxdaemon"
assignees: "linuxdaemon"
sign-commits: true