-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.33 KB
/
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
name: Lint
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
# Replace pull_request with pull_request_target if you
# plan to use this action with forks, see the Limitations section
pull_request:
branches:
- main
jobs:
run-linters:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["20"]
name: Run linters with Node ${{ matrix.node }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: bun
- name: Find bun cache
id: bun-cache-path
run: echo "dir=$(bun cache dir)" >> $GITHUB_OUTPUT
- name: Restore cache
uses: actions/cache@v4
with:
path: ${{ steps.bun-cache-path.outputs.dir }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: ${{ runner.os }}-bun-
- name: Install dependencies
use: oven-sh/setup-bun@v2
with:
bun-version: 1.1.42
run: bun install
- name: Run ESLint
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.github_token }}
# Enable linters
eslint: true