-
Notifications
You must be signed in to change notification settings - Fork 179
35 lines (29 loc) · 958 Bytes
/
lint.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
name: Run lints
on:
workflow_dispatch:
push:
paths: ["**.py"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: |
**/*.py
- name: Upgrade pip
run: pip install --upgrade pip
- name: Install ruff
run: pip install ruff
- name: Ruff check
run: ruff check ${{ steps.changed-files.outputs.all_changed_files }}
- name: Push back changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "fix auto-fixable linting errors"
commit_user_name: "linter-bot"
commit_user_email: "linter-bot@users.noreply.github.com"