Skip to content

[Snyk] Security upgrade next from 14.2.4 to 14.2.7 #40

[Snyk] Security upgrade next from 14.2.4 to 14.2.7

[Snyk] Security upgrade next from 14.2.4 to 14.2.7 #40

name: 🚀 CI/CD Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: npm ci
- name: Test and coverage
run: npx jest --coverage
- name: Sonarqube Scan
uses: sonarsource/[email protected]
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
build:
runs-on: ubuntu-latest
needs: sonarqube
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Build and test
run: npm run build && npm run test
- name: Dependency Vulnerability Check
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: npx snyk test
- name: Deploy to Staging
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
run: |
vercel
- name: Deploy to production
if: github.event_name == 'push' && github.ref == 'refs/tags/*'
run: |
vercel --prod
- name: Automatic Change Log
run: |
npm install -g conventional-changelog-cli
conventional-changelog -p angular -i CHANGELOG.md -s
- name: Notification
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
curl -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d "{\"content\": \"🚀 Portfolio updates deployed to production!\"}"