-
Notifications
You must be signed in to change notification settings - Fork 27
48 lines (42 loc) · 1.24 KB
/
stylelint-pr.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
name: Stylelint PR Diffs
on:
pull_request:
# synchronize commit(s) pushed to the pull request
types: [synchronize, opened]
branches-ignore:
- rc
- stable
- beta
- "lokalise*"
jobs:
stylelint_pr_diffs:
name: Stylelint
runs-on: ubuntu-latest
steps:
- name: Checkout Rep
uses: actions/checkout@v1
- name: Setup Node with 12
uses: actions/setup-node@v1
with:
node-version: "12"
registry-url: "https://npm.pkg.github.com"
- name: Cache Node Modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Clean install (CI) dependencies if lockfile (above) changed
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: stylelint
uses: reviewdog/action-stylelint@v1
with:
github_token: ${{ secrets.github_token }}
fail_on_error: true
reporter: github-pr-review
filter_mode: "diff_context"
stylelint_config: ".stylelintrc.json"
stylelint_input: "**/*.(scss|jsx)"