This commit is contained in:
		
							parent
							
								
									1553f9e7c6
								
							
						
					
					
						commit
						033b5e4fac
					
				
					 3 changed files with 16 additions and 2 deletions
				
			
		
							
								
								
									
										14
									
								
								scripts/deploy.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								scripts/deploy.sh
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| REPO="code.lab.cowley.tech/homelab/homelab-docs" | ||||
| VERSION="$(date +%s)" | ||||
| BRANCH="$(git branch --show-current)" | ||||
| GITREF="$(git rev-parse --short HEAD)" | ||||
| 
 | ||||
| if [ "$(git branch --show-current)" == "main" ] | ||||
| then | ||||
|   docker build -t "${REPO}:${VERSION}-${BRANCH}-${GITREF}" . | ||||
|   docker tag "${REPO}:${VERSION}-${BRANCH}-${GITREF}" "${REPO}:latest" | ||||
|   docker push "${REPO}:${VERSION}-${BRANCH}-${GITREF}" | ||||
|   docker push "${REPO}:latest" | ||||
| fi | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Chris Cowley
						Chris Cowley