Skip to content

Commit

Permalink
Merge pull request #13 from gomicro/docker
Browse files Browse the repository at this point in the history
start docker
  • Loading branch information
dan9186 authored Aug 31, 2021
2 parents 7078d76 + c577c3d commit fc953d1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ builds:
archives:
-
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"

dockers:
-
goos: linux

goarch: amd64

image_templates:
- "gomicro/forge:latest"
- "gomicro/forge:{{ .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 forge forge

CMD ["/forge"]
9 changes: 9 additions & 0 deletions forge.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
project:
name: forge
envs:
DOCKER_PASSWORD: $DOCKER_PASSWORD
DOCKER_USERNAME: $DOCKER_USERNAME
steps:
build:
help: Compiles the project into a binary for the current system's OS
Expand All @@ -11,6 +14,12 @@ steps:
coverage:
help: Generates the code coverage from all the tests
cmd: docker run gomicro/gocover
deploy:
help: deploy the artifacts
cmds:
- echo "Logging into Docker Hub"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- "VERSION={{.ShortSha}} goreleaser release"
install:
help: Installs the binary into GOBIN
envs:
Expand Down

0 comments on commit fc953d1

Please sign in to comment.