-
Notifications
You must be signed in to change notification settings - Fork 14
/
action.yml
39 lines (39 loc) · 1.21 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
# action.yml
name: 'Mypy Check'
description: 'GitHub action to run mypy on your repository'
branding:
icon: 'check-square'
color: 'blue'
inputs:
path:
description: 'File or directory to run mypy on'
required: false
default: '.'
mypy_flags:
description: 'Optional mypy flags (refer to `mypy --help`)'
required: false
default: ''
requirements:
description: 'Optional, if not empty: parameters to pass to `pip install` before running mypy'
required: false
default: ''
requirements_file:
description: 'Optional, if not empty: a file to pass to `pip install -r` before running mypy'
required: false
default: ''
python_version:
description: 'Optional, Python version to use'
required: false
default: '3.10'
outputs:
output:
description: 'The output of mypy'
runs:
using: 'composite'
steps:
- id: build
run: docker build ${{ github.action_path }} --build-arg "pyver=${{ inputs.python_version }}" -t mypy
shell: bash
- id: run
run: docker run --rm -v $(pwd):/github/workspace --workdir /github/workspace mypy "${{ inputs.path }}" "${{ inputs.mypy_flags }}" "${{ inputs.requirements }}" "${{ inputs.requirements_file }}"
shell: bash