88runs :
99 using : " composite"
1010 steps :
11- - name : Check dependencies
11+ - name : Check reporter type
12+ id : reporter-check
1213 shell : bash
13- run : flake8 --version && pylint --version && lintly --help > /dev/null || pip install -U -r requirements.txt
14+ run : |
15+ if [ ${{ github.event_name }} = "pull_request" ]; then
16+ echo "::set-output name=reporter::github-pr-review"
17+ else
18+ echo "::set-output name=reporter::github-check"
19+ fi
1420
1521 - name : Detect changed files
1622@@ -25,20 +31,16 @@ runs:
2531 uses : reviewdog/action-flake8@v3
2632 with :
2733 flake8_args : ${{ steps.changes.outputs.addedOrModifiedPython_files }}
28- reporter : github-pr-review
34+ reporter : ${{ steps.reporter-check.outputs.reporter }}
2935
3036 - name : mypy
3137 uses :
tsuyoshicho/[email protected] 3238 with :
3339 target : ${{ steps.changes.outputs.addedOrModifiedPython }}
34- reporter : github-pr-review
35- fail_on_error : true
40+ reporter : ${{ steps.reporter-check.outputs.reporter }}
3641
3742 - name : pylint
38- shell : bash
39- run : |
40- python $GITHUB_ACTION_PATH/linting_orchestrator.py ${{ github.event_name == 'pull_request' }} pylint ${{ steps.changes.outputs.addedOrModifiedPython_files }}
41- env :
42- GITHUB_TOKEN : ${{ inputs.github_token }}
43- PR_NUMBER : ${{ github.event.number }}
44- REPOSITORY_NAME : ${{ github.repository }}
43+ 44+ with :
45+ glob_pattern : ${{ steps.changes.outputs.addedOrModifiedPython_files }}
46+ reporter : ${{ steps.reporter-check.outputs.reporter }}
0 commit comments