-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (40 loc) · 1.46 KB
/
pre-commit-update.yml
File metadata and controls
48 lines (40 loc) · 1.46 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.5"
jobs:
update-pre-commit-config:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
- name: Install Hatch
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # 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@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
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