new release v0.3

This commit is contained in:
D Ther 2020-10-14 18:11:01 +06:30
parent 3f421fcb7d
commit 08b62fee28
No known key found for this signature in database
GPG key ID: 4729D840D81DC783
4 changed files with 39 additions and 37 deletions

View file

@ -1,30 +1,8 @@
FROM golang:1.13 AS builder
FROM golang:1.13
RUN apt-get update && apt-get -y install upx
#RUN mkdir -p $GOPATH/src/github.com/DTherHtun/google-chat-action
#ADD . $GOPATH/src/github.com/DTherHtun/google-chat-action
RUN go get -u github.com/sethvargo/go-githubactions/...
ENV CGO_ENABLED=0
WORKDIR /src
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
RUN go get -u github.com/sethvargo/go-githubactions/... && go build -o /bin/google-chat-action
ENTRYPOINT ["/bin/google-chat-action"]