forked from ubiquity/pay.ubq.fi
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 805 Bytes
/
knip.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
name: Knip
on:
pull_request:
jobs:
run-knip:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# needed to use yarn v4
- name: Enable corepack
run: corepack enable
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.10.0
- name: Install toolchain
run: yarn install
- name: Store PR number
run: echo ${{ github.event.number }} > pr-number.txt
- name: Run Knip
run: yarn knip || yarn knip --reporter json > knip-results.json
- name: Upload knip result
if: failure()
uses: actions/upload-artifact@v4
with:
name: knip-results
path: |
knip-results.json
pr-number.txt