-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (36 loc) · 1.13 KB
/
pre_commit_run.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
# Copyright (C) 2021 Sebastian Pipping <[email protected]>
# Licensed under GNU Affero GPL v3 or later
name: Run pre-commit on all files
# Drop permissions to minimum, for security
permissions:
contents: read
on:
pull_request:
push:
schedule:
- cron: '0 16 * * 5' # Every Friday 4pm
workflow_dispatch:
jobs:
run_pre_commit:
name: Run pre-commit on all files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python 3.13
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.13
- name: Install pre-commit
run: |-
pip install \
--disable-pip-version-check \
--no-warn-script-location \
--user \
pre-commit
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
- name: Install pre-commit hooks
run: |-
pre-commit install --install-hooks
- name: Run pre-commit on all files
run: |-
pre-commit run --all-files --show-diff-on-failure