This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
Chore/merge-chore/sync-template-template #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |