Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
feat: build -digger-basic image (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerman authored Dec 28, 2020
1 parent 455040e commit 7482858
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/CI&CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ jobs:
IMAGE_TAG="ghcr.io/${GITHUB_REPOSITORY,,*}:$TAG"
docker tag "$(basename $(go list -m))" "$IMAGE_TAG"
docker push "$IMAGE_TAG"
IMAGE_TAG="ghcr.io/${GITHUB_REPOSITORY,,*}-digger-basic:$TAG"
docker tag "$(basename $(go list -m))"-digger-basic "$IMAGE_TAG"
docker push "$IMAGE_TAG"
done
5 changes: 5 additions & 0 deletions Dockerfile.digger_basic
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM alpine:3.12

COPY bin/digger_basic /

CMD ["sh","-c","/digger_basic $ADDRESS:8000"]
1 change: 1 addition & 0 deletions cmd/digger_basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func main() {
case code == codeWrongCoord:
break ROW
case code == -1:
fmt.Println(err)
os.Exit(0)
case code != 0:
continue ROW
Expand Down
1 change: 1 addition & 0 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ build() {
GOOS=linux GOARCH=amd64 build "$@"

docker build -t "$(basename "$(go list -m)")" .
docker build -t "$(basename "$(go list -m)")"-digger-basic -f Dockerfile.digger_basic .

# Build binaries for host system.
test "$(go env GOOS)" = linux -a "$(go env GOARCH)" = amd64 || build "$@"

0 comments on commit 7482858

Please sign in to comment.