Update SonarQube workflow to trigger on push events for all branches and modify project key references in API calls for consistency.
Some checks failed
SonarQube / Build and analyze (push) Failing after 3m1s

This commit is contained in:
Leonid Pershin
2025-10-31 18:28:46 +03:00
parent bc361cd011
commit 90f6348e4d

View File

@@ -1,11 +1,9 @@
name: SonarQube
on:
pull_request:
push:
branches:
- master
- main
types: [opened, synchronize, reopened]
- '*'
jobs:
build:
@@ -78,7 +76,7 @@ jobs:
# Get Quality Gate status using jq for proper JSON parsing
RESPONSE=$(curl -s -u "${{ secrets.SONAR_TOKEN }}:" \
"${{ secrets.SONAR_HOST_URL }}/api/qualitygates/project_status?projectKey=Mrleo1nid.aiimages")
"${{ secrets.SONAR_HOST_URL }}/api/qualitygates/project_status?projectKey=AIImages")
echo "API Response: $RESPONSE"
@@ -94,7 +92,7 @@ jobs:
if [ "$QUALITY_GATE_STATUS" != "OK" ]; then
echo "❌ Quality Gate failed! Status: $QUALITY_GATE_STATUS"
echo "Please check the SonarQube dashboard for details:"
echo "${{ secrets.SONAR_HOST_URL }}/dashboard?id=Mrleo1nid.aiimages"
echo "${{ secrets.SONAR_HOST_URL }}/dashboard?id=AIImages"
exit 1
else
echo "✅ Quality Gate passed!"