-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 872 Bytes
/
pre-commit.yml
File metadata and controls
33 lines (29 loc) · 872 Bytes
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
name: pre-commit
on:
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches:
- 'main'
- 'release/*'
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/[email protected]
continue-on-error: true
- name: Auto-commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Apply pre-commit fixes"
commit_options: "--no-verify"
file_pattern: "*.py"
branch: ${{ github.head_ref }}
skip_dirty_check: false # Skip the action if there are no changes
skip_fetch: false # Fetch the latest changes before committing
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}