-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.33 KB
/
Copy pathcache.yml
File metadata and controls
52 lines (42 loc) · 1.33 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
name: ESLint Auto-fix and Check
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
eslint:
runs-on: ubuntu-latest
steps:
# 0. Stop infinite loop
- name: Check if commit is made by bot
if: github.actor == 'github-actions[bot]'
run: echo "Commit made by bot. Exiting workflow." && exit 0
# 1. Checkout the repository with credentials persisted for push
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
ref: ${{ github.head_ref }}
# 2. Set up pnpm
- uses: pnpm/action-setup@v4
# with:
# version: 10
# 2.1. Cache pnpm store
- name: Get pnpm store
id: pnpm-cache-store
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# 2.2. Cache pnpm store
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache-store.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
# 4. Install dependencies using pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile