ci: update build for multi-machine architecture support
sonarqube / SonarQube Trigger (push) Successful in 2m22s
sonarqube / SonarQube Trigger (push) Successful in 2m22s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user