mirror of
				https://github.com/kitabisa/sonarqube-action.git
				synced 2025-10-31 13:04:18 +08:00 
			
		
		
		
	add condition event only in PR
This commit is contained in:
		
							parent
							
								
									b74f7cb670
								
							
						
					
					
						commit
						9843b73be8
					
				| @ -2,6 +2,14 @@ | |||||||
| 
 | 
 | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
|  | if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then | ||||||
|  | 	EVENT_ACTION=$(jq -r ".action" "${GITHUB_EVENT_PATH}") | ||||||
|  | 	if [[ "${EVENT_ACTION}" != "opened" ]]; then | ||||||
|  | 		echo "No need to run analysis. It is already triggered by the push event." | ||||||
|  | 		exit 78 | ||||||
|  | 	fi | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| if [[ -z "${INPUT_PASSWORD}" ]]; then | if [[ -z "${INPUT_PASSWORD}" ]]; then | ||||||
| 	SONAR_PASSWORD="&& true" | 	SONAR_PASSWORD="&& true" | ||||||
| else | else | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 dw1
						dw1