forked from IgKniteDev/IgKnite
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.13 KB
/
linting.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
54
# SPDX-License-Identifier: MIT
name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check
id: lintcheck
uses: chartboost/ruff-action@v1
continue-on-error: true
with:
args: check .
- name: Lint
uses: chartboost/ruff-action@v1
with:
args: check . --fix
- name: Create pull request
if: steps.lintcheck.outcome != 'success'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "🎨 Automated linting errors fix"
commit-message: "fixed linting errors (ruff)"
body: |
Linter errors found in: ${{ github.sha }}.
base: ${{ github.head_ref }}
branch: actions/ruff
reviewers: hitblast
delete-branch: true