-
Notifications
You must be signed in to change notification settings - Fork 55
54 lines (44 loc) · 1.57 KB
/
pr-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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: PR lint
on:
pull_request:
permissions:
contents: write
deployments: read
pull-requests: write # needed to annotate code
statuses: write
checks: write
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout sources
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
check-latest: true
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
- name: Install
run: yarn install --frozen-lockfile --ignore-scripts
- name: eslint + stylelint
continue-on-error: true
id: eslint
run: yarn lint
- name: Merge lint
run: yarn lint-merge-report master ${GITHUB_HEAD_REF}
- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@5f4dc2e3af8d3c21b727edb597e5503510b1dc9c #v2.2.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: ./eslint-report.json