Skip to content

feat: snyk pipeline #35

feat: snyk pipeline

feat: snyk pipeline #35

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build_test_security_notify:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
# - name: Run tests
# run: npm test
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/[email protected]
with:
args: --severity-threshold=high
fail-on-issues: true
- name: Send failure notification
if: failure()
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: CI/CD Pipeline failed
to: ${{secrets.MAIL}}
from: ${{secrets.MAIL_USERNAME}}
body: The pipeline has failed. Please check the GitHub Actions output.