new release v0.3
This commit is contained in:
parent
3f421fcb7d
commit
08b62fee28
4 changed files with 39 additions and 37 deletions
16
.github/workflows/example.yml
vendored
16
.github/workflows/example.yml
vendored
|
|
@ -8,16 +8,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Hello world
|
- name: Chat Setup
|
||||||
run: echo Hello world $FIRST_NAME $middle_name $Last_Name! $GITHUB_EVENT_NAME $GITHUB_REF $GITHUB_REPOSITORY $GITHUB_SHA
|
uses: docker://dther/google-chat-action:latest
|
||||||
env:
|
with:
|
||||||
FIRST_NAME: Mona
|
msg: someone $GITHUB_EVENT_NAME to $GITHUB_REPOSITORY - $GITHUB_REF - commitid $GITHUB_SHA
|
||||||
middle_name: The
|
webhook: "https://chat.googleapis.com/v1/spaces/AAAAzPcAy4s/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=MmdzluicdrdkyUAV_QwB6BzlLcIhbfrwNzxVrEllaec%3D&threadKey=git-commit"
|
||||||
Last_Name: Octocat
|
|
||||||
# - name: Chat Setup
|
|
||||||
#uses: docker://dther/google-chat-action:latest
|
|
||||||
#with:
|
|
||||||
#msg: ${{github.event.number}
|
|
||||||
#webhook: "https://chat.googleapis.com/v1/spaces/AAAAzPcAy4s/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=MmdzluicdrdkyUAV_QwB6BzlLcIhbfrwNzxVrEllaec%3D&threadKey=git-commit"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
28
Dockerfile
28
Dockerfile
|
|
@ -1,30 +1,8 @@
|
||||||
FROM golang:1.13 AS builder
|
FROM golang:1.13
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install upx
|
WORKDIR /src
|
||||||
|
|
||||||
#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
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN go build \
|
RUN go get -u github.com/sethvargo/go-githubactions/... && go build -o /bin/google-chat-action
|
||||||
-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"]
|
ENTRYPOINT ["/bin/google-chat-action"]
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Chat Setup
|
- name: Chat Setup
|
||||||
uses: DTherHtun/google-chat-action@v0.2
|
uses: DTherHtun/google-chat-action@v0.3
|
||||||
with:
|
with:
|
||||||
msg: ${GITHUB_REF}
|
msg: ${GITHUB_REF}
|
||||||
webhook: "https://chat.googleapis.co....."
|
webhook: "https://chat.googleapis.co....."
|
||||||
|
|
|
||||||
30
docker-slimbuild
Normal file
30
docker-slimbuild
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
FROM golang:1.13 AS builder
|
||||||
|
|
||||||
|
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
|
||||||
|
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"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue