-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (39 loc) · 1.46 KB
/
pre-commit-update.yml
File metadata and controls
47 lines (39 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
name: Update .pre-commit-config.yaml
on:
schedule:
- cron: '0 3 * * 1' # Every Monday at 03:00 UTC
workflow_dispatch:
env:
HATCH_VERSION: "1.15.1"
jobs:
update-pre-commit-config:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: '3.13'
- name: Install Hatch
uses: pypa/hatch@install
with:
version: "${{ env.HATCH_VERSION }}"
- name: Set up Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Update .pre-commit-config.yaml
run: hatch run pre-commit autoupdate --freeze
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7
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