mirror of
				https://github.com/h44z/wg-portal.git
				synced 2025-11-03 23:56:18 +00:00 
			
		
		
		
	
		
			
	
	
		
			10 lines
		
	
	
		
			449 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			10 lines
		
	
	
		
			449 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								#!/bin/bash
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								# File needs to be called /hooks/build relative to the Dockerfile.
							 | 
						||
| 
								 | 
							
								# Some environment variables are injected into the build hook, see: https://docs.docker.com/docker-hub/builds/advanced/.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								GIT_SHORT_HASH=$(echo $SOURCE_COMMIT | cut -c1-7)
							 | 
						||
| 
								 | 
							
								echo "Build hook running for git hash $GIT_SHORT_HASH"
							 | 
						||
| 
								 | 
							
								docker build --build-arg BUILD_IDENTIFIER=$DOCKER_TAG \
							 | 
						||
| 
								 | 
							
								             --build-arg BUILD_VERSION=$GIT_SHORT_HASH \
							 | 
						||
| 
								 | 
							
								             -t $IMAGE_NAME .
							 |