ci: update build for multi-machine architecture support
sonarqube / SonarQube Trigger (push) Successful in 2m22s

This commit is contained in:
2026-01-26 13:06:28 +07:00
parent bb32f25954
commit f93b0bffcb
2 changed files with 154 additions and 97 deletions
+16 -7
View File
@@ -1,9 +1,10 @@
on:
push:
pull_request:
types: [opened, synchronize, reopened]
name: SonarQube Scan
name: sonarqube
jobs:
sonarqube:
name: SonarQube Trigger
@@ -42,14 +43,22 @@ jobs:
- name: Set SonarQube project key
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
if [ "$BRANCH_NAME" = "main" ]; then
SONAR_PROJECT_KEY="tunnel-please"
else
BRANCH_KEY=${BRANCH_NAME//\//-}
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
TAG_NAME=${GITHUB_REF#refs/tags/}
BRANCH_KEY=${TAG_NAME//\//-}
SONAR_PROJECT_KEY="tunnel-please-$BRANCH_KEY"
elif [[ "$GITHUB_REF" == refs/heads/* ]]; then
BRANCH_NAME=${GITHUB_REF#refs/heads/}
if [ "$BRANCH_NAME" = "main" ]; then
SONAR_PROJECT_KEY="tunnel-please"
else
BRANCH_KEY=${BRANCH_NAME//\//-}
SONAR_PROJECT_KEY="tunnel-please-$BRANCH_KEY"
fi
else
SONAR_PROJECT_KEY="tunnel-please"
fi
echo "SONAR_PROJECT_KEY=tunnel-please-$BRANCH_KEY" >> $GITHUB_ENV
echo "SONAR_PROJECT_KEY=$SONAR_PROJECT_KEY" >> $GITHUB_ENV
echo "Using SonarQube Project Key: $SONAR_PROJECT_KEY"
- name: SonarQube Scan