-
Notifications
You must be signed in to change notification settings - Fork 22
57 lines (46 loc) · 1.74 KB
/
eslint-annotate.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
53
54
55
56
57
name: Annotate ES Lint Results
on:
push:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
env:
DISABLE_PROGRESS: true
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
GenerateReport:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: "${{ secrets.ES_LINT_TOKEN }}"
ref: ${{github.event.pull_request.head.sha}}
repository: ${{github.event.pull_request.head.repo.full_name}}
persist-credential: false
- name: Node.JS 16
uses: actions/setup-node@v2
with:
node-version: 16
cache: "npm"
# - run: git config --global url."https://${{ secrets.ES_LINT_TOKEN }}@github.com/".insteadOf ssh://[email protected]/
- name: Install Node Dependencies
run: npm ci
env:
CI: TRUE
- name: Save Code Linting Report to JSON
# This is to show failures in Github pull request using the action below
run: npm run lint:report
continue-on-error: true
env:
DISABLE_PROGRESS: true
- name: Annotate Code Linting Results
uses: ataylorme/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "eslint_report.json"
- name: Upload ESLint report
uses: actions/upload-artifact@v2
with:
name: eslint_report.json
path: eslint_report.json