generated from MeilCli/action-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (51 loc) · 1.78 KB
/
report.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
name: Report
on:
workflow_run:
workflows: ['CI-Master', 'CI-PR']
types:
- completed
jobs:
lint:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- run: sleep 10s
name: wait for API&DB synchronized
- name: Download artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: ci.yml
run_id: ${{ github.event.workflow_run.id }}
name: result
- uses: MeilCli/common-lint-reporter/utils/import-context@v1
id: lint_context
- name: Transform report file
uses: MeilCli/common-lint-reporter/transformer/eslint@v1
with:
report_files: |
eslint_report.json
- name: Filter by file changed
uses: MeilCli/common-lint-reporter/operator/filter-by-file-changed@v1
if: steps.lint_context.outputs.pull_request != 'null'
with:
pull_request: ${{ steps.lint_context.outputs.pull_request }}
- run: cat common_lint.json
- name: Report lint result
uses: MeilCli/common-lint-reporter@v1
with:
report_type: 'check_run'
report_name: 'Check Run Report'
- name: Report lint result
uses: MeilCli/common-lint-reporter@v1
if: steps.lint_context.outputs.pull_request != 'null'
with:
report_type: 'comment'
report_name: 'Comment Report'
pull_request: ${{ steps.lint_context.outputs.pull_request }}
- name: Report lint result
uses: MeilCli/common-lint-reporter@v1
if: steps.lint_context.outputs.pull_request != 'null'
with:
report_type: 'inline_comment'
report_name: 'Inline Comment Report'
pull_request: ${{ steps.lint_context.outputs.pull_request }}