ci: update build for multi-machine architecture support
Docker Build and Push / build-amd64 (push) Failing after 2m42s
Docker Build and Push / build-arm64 (push) Failing after 3m44s
Docker Build and Push / merge (push) Has been skipped
sonarqube / sonarqube (push) Successful in 2m12s

This commit is contained in:
2026-01-26 13:06:28 +07:00
parent bb32f25954
commit 059cfc6a7e
2 changed files with 151 additions and 84 deletions
+16 -8
View File
@@ -1,12 +1,12 @@
name: sonarqube
on:
push:
pull_request:
types: [opened, synchronize, reopened]
name: SonarQube Scan
jobs:
sonarqube:
name: SonarQube Trigger
runs-on: ubuntu-latest
steps:
- name: Checking out
@@ -42,14 +42,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