-
-
Notifications
You must be signed in to change notification settings - Fork 286
34 lines (27 loc) · 1.2 KB
/
flutter-analyze-commenter.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
name: flutter-analyze-commenter example
on: pull_request # Only supports run by pull request
jobs:
flutter-analyze:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # Write permission is required to add comments on a PR
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
- run: flutter pub get
working-directory: ./packages/smooth_app
# Run flutter analyze with --write option
- run: flutter analyze --write=flutter_analyze.log
working-directory: ./packages/smooth_app
# (Optional)Run custom lint with --format=json option
- if: ${{ !cancelled() }}
run: dart run custom_lint --format=json > custom_lint.log
working-directory: ./packages/smooth_app
# Use flutter-analyze-commenter
- if: ${{ !cancelled() }} # Required to run this step even if failure
uses: yorifuji/flutter-analyze-commenter@v1
with:
analyze-log: flutter_analyze.log # file path for analyze log
custom-lint-log: custom_lint.log # file path for custom lint log (optional)
verbose: false # verbose output (optional)