-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
48 lines (44 loc) · 1.44 KB
/
action.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
name: "adopt-ruff"
branding:
icon: "arrow-up"
color: "yellow"
description: "Adopt ruff easily"
inputs:
ref:
description: "adopt-ruff reference to install"
default: master
path:
description: "directory adopt-ruff will search for ruff violations. Default is CWD."
default: "."
config-file-path:
description: "Path to the pyproject.toml/ruff.toml file. If not provided, adopt-ruff will attempt to locate it under cwd"
default: ""
repo-name:
description: "name of the repository being checked"
default: ${{ github.repository }}
include-sometimes-fixable:
description: "whether to count sometimes-fixable rules as fixable"
default: "False"
include-preview:
description: "whether to count preview rules"
default: "True"
runs:
using: "composite"
steps:
- name: Install adopt-ruff
run: pip install git+https://github.com/ScDor/adopt-ruff@${{inputs.ref}} -q
shell: bash
- name: Run adopt-ruff
run: |
adopt-ruff
cat result.md > $GITHUB_STEP_SUMMARY
env:
ADOPT_RUFF_REPO_NAME: ${{ inputs.repo-name }}
ADOPT_RUFF_SOMETIMES_FIXABLE: ${{ inputs.include-sometimes-fixable }}
ADOPT_RUFF_PREVIEW: ${{ inputs.include-preview }}
ADOPT_RUFF_CODE_PATH: ${{ inputs.path }}
ADOPT_RUFF_CONFIG_FILE_PATH: ${{ inputs.config-file-path }}
shell: bash
- uses: actions/upload-artifact@v4
with:
path: artifacts