Skip to content

Update sonarqube.yml #12

Update sonarqube.yml

Update sonarqube.yml #12

Workflow file for this run

name: SonarQube + CNES Report
on:
push:
branches:
- main
pull_request:
jobs:
sonar-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: SonarQube Analysis
uses: SonarSource/sonarqube-scan-action@v2
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarqube.k8s-ants.inf.um.es
#- name: Show SonarQube Dashboard URL
# run: echo "See results: https://sonarqube.k8s-ants.inf.um.es/dashboard?id=idm-fluidos-aries-framework-go"
- name: Download CNES Report CLI
run: |
curl -L -o sonar-cnes-report.jar https://github.com/cnescatlab/sonar-cnes-report/releases/latest/download/sonar-cnes-report.jar
- name: Generate CNES Report
run: |
mkdir report
java -jar sonar-cnes-report.jar \
-s https://sonarqube.k8s-ants.inf.um.es \
-t ${{ secrets.SONAR_TOKEN }} \
-p idm-fluidos-aries-framework-go \
-o ./report \
-f console,html,md
- name: Upload CNES Report Artifact
uses: actions/upload-artifact@v4
with:
name: sonarqube-cnes-report
path: ./report