make build image only push if push is specified
This commit is contained in:
		
					parent
					
						
							
								dee2b1a90c
							
						
					
				
			
			
				commit
				
					
						26f3a1881d
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -15,4 +15,9 @@ tag=${tagprefix}:${version}
 | 
				
			||||||
set -ex
 | 
					set -ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
docker build -t "${tag}" .
 | 
					docker build -t "${tag}" .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					push=$1; shift
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$push" ]; then
 | 
				
			||||||
    docker push "${tag}"
 | 
					    docker push "${tag}"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue