Skip to content

improving CI GH actions/workflow #1

improving CI GH actions/workflow

improving CI GH actions/workflow #1

Workflow file for this run

name: Security scan
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# setup node env
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run security audit
run: npm audit --production --json > audit.json || true
- name: report code vulnerabilities
run: |
if [ -s audit.json ]; then
echo "Vulnerabilities found:"
cat audit.json
fi