-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (51 loc) · 1.66 KB
/
pre-commit-updater.yml
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
49
50
51
52
53
name: Pre-commit updater
on:
workflow_dispatch:
schedule:
# min hour dom month dow
- cron: '0 5 * * 3'
env:
python_version: '3.13'
jobs:
updater:
name: Update
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
objects.githubusercontent.com:443
pypi.org:443
raw.githubusercontent.com:443
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: main
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ env.python_version }}
cache: pip
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Update pre-commit hooks
run: pre-commit autoupdate --freeze
- name: Run pre-commit hooks
run: pre-commit run --all-files
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.PR_CREATOR }}
commit-message: Update pre-commit hooks
branch: pre-commit-update
delete-branch: true
title: 'Update pre-commit hooks'
body: |
This PR was automatically created to make the following update:
- Update pre-commit hooks
labels: |
skip-changelog