From b0272f721ccff55007ed82e47f07293f1d55feeb Mon Sep 17 00:00:00 2001 From: Aleksy Rybicki Date: Wed, 18 Feb 2026 11:56:05 +0000 Subject: [PATCH] Fix: manifest.json bump and enabled sonar --- .../workflows/frontend-monorepo-workflow.yml | 71 +++++++++---------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/.github/workflows/frontend-monorepo-workflow.yml b/.github/workflows/frontend-monorepo-workflow.yml index 6c7ecf32..a40dc4fb 100644 --- a/.github/workflows/frontend-monorepo-workflow.yml +++ b/.github/workflows/frontend-monorepo-workflow.yml @@ -217,46 +217,43 @@ jobs: sonar_org: 'mov-ai' sonar_token: ${{ secrets.sonar_token }} - # - name: SonarCloud Scan - # uses: SonarSource/sonarqube-scan-action@v6 - # env: - # GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any - # SONAR_TOKEN: ${{ secrets.sonar_token }} - # with: - # projectBaseDir: ./ - # args: > - # "-Dsonar.organization=mov-ai" - # "-Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}" - # "-Dsonar.sources=." - # "-Dsonar.scm.provider=git" - # "-Dsonar.qualitygate.wait=true" - # "-Dsonar.qualitygate.timeout=300" - # "-Dsonar.coverage.exclusions=**/*.test.js,**/*.test.jsx" - # "-Dsonar.cpd.exclusions=**/*.test.js,**/*.test.jsx" - # "-Dsonar.javascript.lcov.reportPaths=**/coverage/lcov.info" - # "-Dsonar.nodejs.executable=${{ steps.build_step.outputs.node_path }}" - # "-Dsonar.exclusions=.nx/**" - - # - name: Link to SonarCloud dashboard - # shell: bash - # run: | - # echo "Please check report here: https://sonarcloud.io/project/overview?id=${{ github.repository_owner }}_${{ github.event.repository.name }}" - - - name: Check manifest.json exists - id: check_manifest_json - uses: andstor/file-existence-action@v3 + - name: SonarCloud Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.sonar_token }} with: - files: 'manifest.json' + projectBaseDir: ./ + args: > + "-Dsonar.organization=mov-ai" + "-Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}" + "-Dsonar.sources=." + "-Dsonar.scm.provider=git" + "-Dsonar.qualitygate.wait=true" + "-Dsonar.qualitygate.timeout=300" + "-Dsonar.coverage.exclusions=**/*.test.js,**/*.test.jsx" + "-Dsonar.cpd.exclusions=**/*.test.js,**/*.test.jsx" + "-Dsonar.javascript.lcov.reportPaths=**/coverage/lcov.info" + "-Dsonar.nodejs.executable=${{ steps.build_step.outputs.node_path }}" + "-Dsonar.exclusions=.nx/**" + + - name: Link to SonarCloud dashboard + shell: bash + run: | + echo "Please check report here: https://sonarcloud.io/project/overview?id=${{ github.repository_owner }}_${{ github.event.repository.name }}" - name: Bump manifest.json metadata Version - if: ${{ steps.check_manifest_json.outputs.files_exists == 'true' }} - uses: restackio/update-json-values-action@v1.0.0 - with: - file: build/manifest.json - values: | - { - "version": "${{steps.vars-after-raise.outputs.npm_pkg_version}}" - } + run: | + for dir in ${{ inputs.applications }}; do + if [ -f "$dir/build/manifest.json" ]; then + echo "Updating manifest.json in $dir" + version="${{ steps.vars-after-raise.outputs.npm_pkg_version }}" + jq --arg v "$version" '.version = $v' "$dir/build/manifest.json" > "$dir/build/manifest.json.tmp" + rm "$dir/build/manifest.json" + mv "$dir/build/manifest.json.tmp" "$dir/build/manifest.json" + echo "Updated manifest.json version to $version in $dir" + fi + done - name: Pack debian run: |