Skip to content

Commit

Permalink
Create sonarqube.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
novashdima authored Jan 26, 2024
1 parent b6099aa commit d398a5e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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

0 comments on commit d398a5e

Please sign in to comment.