add action & entrypoint

This commit is contained in:
dw1
2020-01-30 16:35:26 +07:00
parent fcf0075f5e
commit b74f7cb670
2 changed files with 43 additions and 0 deletions

20
entrypoint.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
if [[ -z "${INPUT_PASSWORD}" ]]; then
SONAR_PASSWORD="&& true"
else
SONAR_PASSWORD="${INPUT_PASSWORD}"
fi
sonar-scanner \
-Dsonar.host.url=${INPUT_HOST} \
-Dsonar.projectKey=${PWD##*/} \
-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} \
-Dsonar.login=${INPUT_LOGIN} \
-Dsonar.password=${INPUT_PASSWORD} \
-Dsonar.sources=. \
-Dsonar.sourceEncoding=UTF-8 \
${SONAR_PASSWORD}