npm audit #315
This file contains hidden or 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: npm audit | |
| on: | |
| pull_request: | |
| merge_group: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 10 * * *' | |
| jobs: | |
| npm-scan: | |
| name: ts-sdk npm audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Get PNPM store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$HOME/.local/share/pnpm/store" >> $GITHUB_ENV | |
| - name: Setup PNPM cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Run pnpm audit | |
| run: pnpm audit |