-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·64 lines (56 loc) · 1.57 KB
/
auto-prettier-user.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
58
59
60
61
62
63
64
on:
pull_request:
branches:
- develop
paths:
- "view-user/**"
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: view-user/package-lock.json
- run: npm install
working-directory: view-user
# - name: prettier format
# run: npm run format
# working-directory: view-user
- name: lint
run: npm run lint:fix
working-directory: view-user
# - uses: stefanzweifel/[email protected]
# with:
# branch: develop
# commit_message: formatted by workflow
# commit_options: '--no-verify'
lint_check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: view-user/package-lock.json
- name: Install Dependencies
run: npm ci
working-directory: view-user
- name: Run ESLint Reviewdog
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
eslint_flags: "src/**/*.{ts,tsx}"
workdir: view-user