-
Notifications
You must be signed in to change notification settings - Fork 43
34 lines (32 loc) · 973 Bytes
/
lint.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: Lint
on:
pull_request:
branches:
- '*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: |
npm ci
- name: Lint
run: |
FORCE_COLOR=1 npm run lint
- name: Annotate
uses: yuzutech/[email protected]
with:
title: 'report'
repo-token: "${{ secrets.GITHUB_TOKEN }}"
input: './annotations.json'
# when the pull request is created from a fork repository,
# the token won't have write permissions to the origin repository.
ignore-unauthorized-error: true
# the previous task `npm run lint` will return 1 as exit code if there are any issues,
# but we still want to execute this task to annotate the code.
if: ${{ always() }}