Update sonarqube.yml #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |