-
Notifications
You must be signed in to change notification settings - Fork 35
58 lines (50 loc) · 1.36 KB
/
lint.yml
File metadata and controls
58 lines (50 loc) · 1.36 KB
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
name: 'Lint'
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v6
with:
# github.token as a fallback, since other user might trigger this
# workflow in their pull request
token: ${{ secrets.PAT || github.token }}
- name: Setup Mise
uses: jdx/mise-action@v3
with:
install_args: node@latest pnpm@10
tool_versions: |
node latest
pnpm 10
cache: true
- name: Get pnpm store path
id: pnpm-cache
run: 'echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT'
- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
- name: Install project dependencies
run: 'pnpm install'
- name: Lint
id: lint
run: 'pnpm run lint:check || pnpm run lint'
- name: Commit
if: ${{ steps.format.lint == 'success' }}
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: 'ci: lint [skip ci]'