23 lines
460 B
YAML
23 lines
460 B
YAML
name: SonarQube Scan
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
sonar:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run SonarQube scan
|
|
run: |
|
|
docker run --rm \
|
|
-e SONAR_HOST_URL=${{ secrets.SONAR_HOST_URL }} \
|
|
-e SONAR_LOGIN=${{ secrets.SONAR_TOKEN }} \
|
|
-v "$PWD:/usr/src" \
|
|
sonarsource/sonar-scanner-cli
|