Skip to content

Create sonarqube.yml #1

Create sonarqube.yml

Create sonarqube.yml #1

Workflow file for this run

name: Check
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: sonarqube
permissions: read-all
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Dependency check
env:
NVDAPIKEY: ${{ secrets.NVDAPIKEY }}
run: dependency-check.sh --exclude .sonar/ --exclude .scannerwork/ --exclude .git/ --out . --scan . --nvdApiKey "$NVDAPIKEY"
- name: Sonar scanner
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: NODE_OPTIONS="--max-old-space-size=4096" NODE_ENV=production sonar-scanner