Skip to content

Create sample.yml

Create sample.yml #1

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Scan files with Trivy
run: |
trivy fs . > trivy-files.txt
# Assuming Trivy is already installed in the system
- name: Install dependencies and build
run: |
npm install
npm run build
- name: Send scan reports via email
run: |
echo "Scan report attached." | mail -s "Trivy Scan Report" -A trivy-files.txt [email protected]