chore(repo): fix npm-audit workflow, only run on origin (#28457)
This commit is contained in:
parent
45b0b7d902
commit
3cab51389f
12
.github/workflows/npm-audit.yml
vendored
12
.github/workflows/npm-audit.yml
vendored
@ -8,25 +8,21 @@ on:
|
|||||||
permissions: {}
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
audit:
|
audit:
|
||||||
|
if: ${{ github.repository_owner == 'nrwl' }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install PNPM
|
- uses: pnpm/action-setup@v4
|
||||||
run: |
|
with:
|
||||||
npm install -g @pnpm/exe@8
|
version: 9.8.0 # Aligned with root package.json (pnpm/action-setup will helpfully error if out of sync)
|
||||||
|
|
||||||
- name: Run a security audit
|
- name: Run a security audit
|
||||||
run: pnpm dlx audit-ci --critical --report-type summary
|
run: pnpm dlx audit-ci --critical --report-type summary
|
||||||
|
|
||||||
# - name: Run Dependency confusion supply chain check
|
|
||||||
# run: npx snync -d .
|
|
||||||
|
|
||||||
report:
|
report:
|
||||||
if: ${{ always() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
|
if: ${{ always() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
|
||||||
needs: audit
|
needs: audit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user