Skip to content

Commit

Permalink
Merge pull request #8 from gomicro/docker
Browse files Browse the repository at this point in the history
Adding docker image
  • Loading branch information
dan9186 authored Apr 26, 2020
2 parents e51b1f9 + ecf46e0 commit 99bf3da
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
env:
GOPATH: ${{ github.workspace }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}

steps:

Expand Down
10 changes: 10 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,13 @@ builds:
archives:
-
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"

dockers:
-
goos: linux

goarch: amd64

image_templates:
- "gomicro/probe:latest"
- "gomicro/probe:{{ .Env.VERSION }}"
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM scratch
MAINTAINER dev@gomicro.io

ADD probe probe

CMD ["/probe"]
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ coverage: ## Generates the total code coverage of the project

.PHONY: deploy
deploy: ## Deploy the artifacts
@echo "Logging into Docker Hub"
-@echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
@ext/goreleaser release

.PHONY: help
Expand Down

0 comments on commit 99bf3da

Please sign in to comment.