Skip to content

fix: lint

fix: lint #298

Workflow file for this run

name: Trunk CI
on:
push:
pull_request:
branches: [main, dev]
jobs:
trunk:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 20.12
- name: Set yarn cache directory
run: yarn config set cache-folder .yarn-cache
continue-on-error: true
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: |
.yarn-cache
node_modules
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
continue-on-error: true
- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline --no-audit
- name: Lint (changes)
if: github.event_name == 'pull_request'
uses: trunk-io/trunk-action@4f077db8a20117a021b787adbf62729ae143c19e
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}
- name: Lint (codebase)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
uses: trunk-io/trunk-action@4f077db8a20117a021b787adbf62729ae143c19e
with:
check-mode: all
trunk-token: ${{ secrets.TRUNK_TOKEN }}