Skip to content

npm-audit

npm-audit #27

Workflow file for this run

on:
workflow_dispatch:
name: npm-audit
jobs:
findPackages:
runs-on: ubuntu-latest
outputs:
nodePaths: ${{ steps.interrogate.outputs.nodePaths }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: 18
- id: interrogate
run: node ./.github/workflows/list-node-paths-for-deps.js
updateDeps:
runs-on: ubuntu-latest
needs: findPackages
strategy:
fail-fast: false
max-parallel: 4
matrix:
package: ${{fromJson(needs.findPackages.outputs.nodePaths)}}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: 18
- run: echo ./packages/${{ matrix.package }}
- run: cd ./packages/${{ matrix.package }} && npm audit fix
continue-on-error: true
- uses: googleapis/code-suggester@9c92ffb751cbdc880473aa650013b3a3292f743a # v4
env:
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
with:
command: pr
upstream_owner: googleapis
upstream_repo: repo-automation-bots
description: 'ran `npm audit fix` in packages/${{ matrix.package }}'
title: 'chore: update lock file for ${{ matrix.package }}'
message: 'chore: update lock file for ${{ matrix.package }}'
branch: update-lock-file-${{ matrix.package }}
primary: main
force: true
git_dir: '.'