Skip to content

Commit c62ae1f

Browse files
committed
Fix SonarQube Cloud integration
1 parent 96eaa35 commit c62ae1f

1 file changed

Lines changed: 8 additions & 18 deletions

File tree

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,18 @@ on:
1010

1111
jobs:
1212

13-
sonarcloud-secrets:
14-
name: SonarCloud check secrets are present
15-
runs-on: ubuntu-latest
16-
outputs:
17-
sonar: ${{ steps.check-secrets.outputs.sonar }}
18-
steps:
19-
- name: Check secrets are present
20-
id: check-secrets
21-
run: |
22-
if [ -n "${{ secrets.SONAR_TOKEN }}" ]; then
23-
echo "sonar=yes" >> $GITHUB_OUTPUT
24-
else
25-
echo "sonar=no" >> $GITHUB_OUTPUT
26-
echo "::warning ::SONAR_TOKEN non set"
27-
fi
28-
29-
sonarcloud:
13+
sonarqube-cloud:
3014
name: SonarCloud Scan and Report
31-
needs: [ "tests-coverage", "sonarcloud-secrets" ]
15+
needs: [ "sonarcloud-secrets" ]
3216
if: ${{ needs.sonarcloud-secrets.outputs.sonar == 'yes' }}
3317
runs-on: "ubuntu-latest"
3418
steps:
19+
- name: Check SONAR_TOKEN secret
20+
run: |
21+
if [ -z "${{ secrets.SONAR_TOKEN }}" ]; then
22+
echo "::warning ::SONAR_TOKEN non set"
23+
exit 1
24+
fi
3525
- name: Checkout
3626
uses: actions/checkout@v4
3727
- name: Unshallow clone to provide blame information

0 commit comments

Comments
 (0)