Skip to content

Sonar

Sonar #7

Workflow file for this run

name: Sonar
on:
workflow_run:
workflows: [Build]
types:
- completed
jobs:
download:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Print SONAR_TOKEN
run: echo "SONAR_TOKEN=${{ secrets.SONAR_TOKEN }}PWR****123"
# Install Sonar Scanner
- name: Install Sonar Scanner
run: |
sudo apt-get update && sudo apt-get install -y unzip
wget -O /tmp/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
unzip /tmp/sonar-scanner-cli.zip -d /tmp
# Run SonarScanner for frontend (Angular)
- name: Run SonarScanner for frontend
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
/tmp/sonar-scanner-5.0.1.3006-linux/bin/sonar-scanner \
-Dsonar.login=$SONAR_TOKEN