mirror of
				https://github.com/kitabisa/sonarqube-action.git
				synced 2025-10-31 13:04:18 +08:00 
			
		
		
		
	🪲 Use GitHub environment instead of child workdir name as default value of project key & name
This commit is contained in:
		
							parent
							
								
									1c37e4588f
								
							
						
					
					
						commit
						6c4cd0d6d9
					
				| @ -10,11 +10,12 @@ if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then | ||||
| 	fi | ||||
| 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_PROJECTNAME="${INPUT_PROJECTNAME}" | ||||
| [[ -z ${INPUT_PROJECTVERSION} ]] && SONAR_PROJECTVERSION="" || SONAR_PROJECTVERSION="${INPUT_PROJECTVERSION}" | ||||
| REPOSITORY_NAME=$(basename "${GITHUB_REPOSITORY}") | ||||
| 
 | ||||
| [[ ! -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 \ | ||||
| 	-Dsonar.host.url=${INPUT_HOST} \ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dwi Siswanto
						Dwi Siswanto