Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10a365b29a | ||
|
|
8c154cc36b | ||
|
|
c7058a020f | ||
|
|
9b52913486 | ||
|
|
532659cc88 | ||
|
|
c94954550f | ||
|
|
9b7b1d0336 |
@@ -1,11 +1,11 @@
|
|||||||
FROM newtmitch/sonar-scanner:4.0.0-alpine
|
FROM sonarsource/sonar-scanner-cli:4
|
||||||
|
|
||||||
LABEL "com.github.actions.name"="SonarQube Scan"
|
LABEL "com.github.actions.name"="SonarQube Scan"
|
||||||
LABEL "com.github.actions.description"="Scan your code with SonarQube Scanner to detect bugs, vulnerabilities and code smells in more than 25 programming languages."
|
LABEL "com.github.actions.description"="Scan your code with SonarQube Scanner to detect bugs, vulnerabilities and code smells in more than 25 programming languages."
|
||||||
LABEL "com.github.actions.icon"="check"
|
LABEL "com.github.actions.icon"="check"
|
||||||
LABEL "com.github.actions.color"="green"
|
LABEL "com.github.actions.color"="green"
|
||||||
|
|
||||||
LABEL version="0.0.1"
|
LABEL version="0.0.2"
|
||||||
LABEL repository="https://github.com/kitabisa/sonarqube-action"
|
LABEL repository="https://github.com/kitabisa/sonarqube-action"
|
||||||
LABEL homepage="https://kitabisa.github.io"
|
LABEL homepage="https://kitabisa.github.io"
|
||||||
LABEL maintainer="dwisiswant0"
|
LABEL maintainer="dwisiswant0"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: SonarQube Scan
|
- name: SonarQube Scan
|
||||||
uses: kitabisa/sonarqube-action@master
|
uses: kitabisa/sonarqube-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SONARQUBE_HOST }}
|
host: ${{ secrets.SONARQUBE_HOST }}
|
||||||
login: ${{ secrets.SONARQUBE_TOKEN }}
|
login: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
|
|||||||
@@ -13,17 +13,25 @@ fi
|
|||||||
REPOSITORY_NAME=$(basename "${GITHUB_REPOSITORY}")
|
REPOSITORY_NAME=$(basename "${GITHUB_REPOSITORY}")
|
||||||
|
|
||||||
[[ ! -z ${INPUT_PASSWORD} ]] && SONAR_PASSWORD="${INPUT_PASSWORD}" || SONAR_PASSWORD=""
|
[[ ! -z ${INPUT_PASSWORD} ]] && SONAR_PASSWORD="${INPUT_PASSWORD}" || SONAR_PASSWORD=""
|
||||||
[[ -z ${INPUT_PROJECTKEY} ]] && SONAR_PROJECTKEY="${REPOSITORY_NAME}" || SONAR_PROJECTKEY="${INPUT_PROJECTKEY}"
|
|
||||||
[[ -z ${INPUT_PROJECTNAME} ]] && SONAR_PROJECTNAME="${REPOSITORY_NAME}" || SONAR_PROJECTNAME="${INPUT_PROJECTNAME}"
|
|
||||||
[[ -z ${INPUT_PROJECTVERSION} ]] && SONAR_PROJECTVERSION="" || SONAR_PROJECTVERSION="${INPUT_PROJECTVERSION}"
|
|
||||||
|
|
||||||
sonar-scanner \
|
if [[ ! -f "${GITHUB_WORKSPACE}/sonar-project.properties" ]]; then
|
||||||
-Dsonar.host.url=${INPUT_HOST} \
|
[[ -z ${INPUT_PROJECTKEY} ]] && SONAR_PROJECTKEY="${REPOSITORY_NAME}" || SONAR_PROJECTKEY="${INPUT_PROJECTKEY}"
|
||||||
-Dsonar.projectKey=${SONAR_PROJECTKEY} \
|
[[ -z ${INPUT_PROJECTNAME} ]] && SONAR_PROJECTNAME="${REPOSITORY_NAME}" || SONAR_PROJECTNAME="${INPUT_PROJECTNAME}"
|
||||||
-Dsonar.projectName=${SONAR_PROJECTNAME} \
|
[[ -z ${INPUT_PROJECTVERSION} ]] && SONAR_PROJECTVERSION="" || SONAR_PROJECTVERSION="${INPUT_PROJECTVERSION}"
|
||||||
-Dsonar.projectVersion=${SONAR_PROJECTVERSION} \
|
sonar-scanner \
|
||||||
-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} \
|
-Dsonar.host.url=${INPUT_HOST} \
|
||||||
-Dsonar.login=${INPUT_LOGIN} \
|
-Dsonar.projectKey=${SONAR_PROJECTKEY} \
|
||||||
-Dsonar.password=${INPUT_PASSWORD} \
|
-Dsonar.projectName=${SONAR_PROJECTNAME} \
|
||||||
-Dsonar.sources=. \
|
-Dsonar.projectVersion=${SONAR_PROJECTVERSION} \
|
||||||
-Dsonar.sourceEncoding=UTF-8
|
-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} \
|
||||||
|
-Dsonar.login=${INPUT_LOGIN} \
|
||||||
|
-Dsonar.password=${SONAR_PASSWORD} \
|
||||||
|
-Dsonar.sources=. \
|
||||||
|
-Dsonar.sourceEncoding=UTF-8
|
||||||
|
else
|
||||||
|
sonar-scanner \
|
||||||
|
-Dsonar.host.url=${INPUT_HOST} \
|
||||||
|
-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} \
|
||||||
|
-Dsonar.login=${INPUT_LOGIN} \
|
||||||
|
-Dsonar.password=${SONAR_PASSWORD}
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user