diff --git a/action.yaml b/action.yaml index 5e44bae..d221890 100644 --- a/action.yaml +++ b/action.yaml @@ -16,7 +16,11 @@ inputs: required: false default: "" projectName: - description: "The project's name. If not given name will be generated by SonarQube" + description: "Name of the project that will be displayed on the web interface." + required: false + default: "" + projectVersion: + description: "The project version." required: false default: "" projectBaseDir: diff --git a/entrypoint.sh b/entrypoint.sh index a38febe..6b59027 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -13,6 +13,7 @@ fi [[ ! -z ${INPUT_PASSWORD} ]] && SONAR_PASSWORD="${INPUT_PASSWORD}" || SONAR_PASSWORD="" [[ -z ${INPUT_PROJECTKEY} ]] && SONAR_PROJECTKEY="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTKEY}" [[ -z ${INPUT_PROJECTNAME} ]] && SONAR_PROJECTNAME="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTNAME}" +[[ -z ${INPUT_PROJECTVERSION} ]] && SONAR_PROJECTVERSION="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTVERSION}" sonar-scanner \