diff --git a/.dockerignore b/.dockerignore index ce15bcb..b36678c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,3 @@ tools/ .gitignore LICENSE.MIT -Makefile diff --git a/Dockerfile b/Dockerfile index ffa1192..5d4dae2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ -FROM golang:1.14-buster - +FROM golang:1.14-buster AS builder ADD . /gh-action-detect-unmergeable/ - WORKDIR /gh-action-detect-unmergeable/ -RUN ["go", "build", "-o", "app"] +RUN ["make", "build", "-j"] -ENTRYPOINT ["/gh-action-detect-unmergeable/app"] +FROM debian:buster-20200607-slim +WORKDIR /root/ +COPY --from=builder /gh-action-detect-unmergeable/ghaction_unmergeable_detection . +ENTRYPOINT ["/root/ghaction_unmergeable_detection"] \ No newline at end of file diff --git a/Makefile b/Makefile index fa40930..9eea7ea 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ GO_CMD := go GO_BUILD := $(GO_CMD) build -DIST_APP_BIN_NAME := app +DIST_APP_BIN_NAME := ghaction_unmergeable_detection all: help