-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.02 KB
/
pre-commit-autoupdate.yml
File metadata and controls
44 lines (36 loc) · 1.02 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
name: Pre-commit autoupdate
on:
schedule:
- cron: "0 3 * * 1"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Run pre-commit autoupdate
run: |
pre-commit autoupdate
- name: Set date for PR metadata
run: |
echo "PR_DATE=$(date +%Y-%m-%d)" >> "$GITHUB_ENV"
- name: Create pull request
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore: pre-commit autoupdate (${PR_DATE})"
title: "chore: pre-commit autoupdate (${PR_DATE})"
body: "Automated pre-commit autoupdate (${PR_DATE})."
branch: "chore/pre-commit-autoupdate-${PR_DATE}"
delete-branch: true