first commit

This commit is contained in:
D Ther 2020-10-14 16:17:09 +06:30
commit 16a9260572
No known key found for this signature in database
GPG key ID: 4729D840D81DC783
4 changed files with 79 additions and 0 deletions

28
Dockerfile Normal file
View file

@ -0,0 +1,28 @@
FROM golang:1.13 AS builder
RUN apt-get update && apt-get -y install upx
ENV GO111MODULE=on CGO_ENABLED=0
COPY . .
RUN go build \
-a \
-trimpath \
-ldflags "-s -w -extldflags '-static'" \
-installsuffix cgo \
-tags netgo \
-o /bin/google-chat-action \
.
RUN strip /bin/google-chat-action
RUN upx -q -9 /bin/google-chat-action
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /bin/google-chat-action /bin/google-chat-action
ENTRYPOINT ["/bin/google-chat-action"]