chore(repo): fix npm-audit workflow, only run on origin (#28457)

This commit is contained in:
James Henry 2024-10-15 23:38:21 +04:00 committed by GitHub
parent 45b0b7d902
commit 3cab51389f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,25 +8,21 @@ on:
permissions: {}
jobs:
audit:
if: ${{ github.repository_owner == 'nrwl' }}
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PNPM
run: |
npm install -g @pnpm/exe@8
- uses: pnpm/action-setup@v4
with:
version: 9.8.0 # Aligned with root package.json (pnpm/action-setup will helpfully error if out of sync)
- name: Run a security audit
run: pnpm dlx audit-ci --critical --report-type summary
# - name: Run Dependency confusion supply chain check
# run: npx snync -d .
report:
if: ${{ always() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: audit