Feature/autobuild docker image for each release thru dockerhub auto builds (#886)
* feat: build hook for dockerhub autobuilds * release new image * Create pre_build * Update push
This commit is contained in:
		
							parent
							
								
									e6f1db128c
								
							
						
					
					
						commit
						757e748e3f
					
				|  | @ -0,0 +1,6 @@ | ||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | echo "=> Building container" | ||||||
|  | docker build \ | ||||||
|  |   --tag "$IMAGE_NAME" \ | ||||||
|  |   --file Dockerfile . | ||||||
|  | @ -0,0 +1,9 @@ | ||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | go() | ||||||
|  | { | ||||||
|  |   docker run --rm -v "$(pwd):/workspace" -w /workspace golang:latest go $@; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | go get -u github.com/tcnksm/ghr github.com/mitchellh/gox | ||||||
|  | go mod vendor | ||||||
|  | @ -0,0 +1,11 @@ | ||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | echo "=> Fetch unshallow origin" | ||||||
|  | git fetch --unshallow origin || true | ||||||
|  | 
 | ||||||
|  | echo "=> Tag image:" | ||||||
|  | docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:$(git describe --tags --abbrev=0 HEAD^)" | ||||||
|  | docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:$(git describe --tags --abbrev=0 HEAD)" | ||||||
|  | 
 | ||||||
|  | echo "=> Push images" | ||||||
|  | docker push "${DOCKER_REPO}" | ||||||
		Loading…
	
		Reference in New Issue