-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into telegram-parse-mode
- Loading branch information
Showing
1,112 changed files
with
314,674 additions
and
17,906 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ _testmain.go | |
gin-bin | ||
bin | ||
config.yaml | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
language: go | ||
|
||
go: | ||
- "1.10" | ||
- 1.9 | ||
- tip | ||
- "1.15" | ||
- "1.16" | ||
- tip | ||
|
||
script: go test ./... | ||
script: | ||
- go test ./... | ||
|
||
deploy: | ||
- provider: script | ||
script: bash build_push_image.sh | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
FROM golang:alpine | ||
FROM golang:1.17 AS builder | ||
|
||
RUN apk add --no-cache --virtual git openssl ca-certificates && \ | ||
go get github.com/messagebird/sachet/cmd/... && \ | ||
rm -rf src pkg && \ | ||
apk del git | ||
WORKDIR /build | ||
|
||
COPY examples/config.yaml /etc/sachet/config.yaml | ||
COPY . . | ||
|
||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -mod vendor -o sachet github.com/messagebird/sachet/cmd/sachet | ||
|
||
FROM alpine | ||
|
||
COPY --from=builder /build/sachet /usr/local/bin | ||
COPY --chown=nobody examples/config.yaml /etc/sachet/config.yaml | ||
RUN apk update && \ | ||
apk add --no-cache ca-certificates | ||
|
||
USER nobody | ||
EXPOSE 9876 | ||
ENTRYPOINT ["sachet"] | ||
CMD ["-config", "/etc/sachet/config.yaml"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [[ ${TRAVIS_EVENT_TYPE} == "cron" ]]; then | ||
exit 0 | ||
fi | ||
|
||
IMAGE_NAME="messagebird/sachet" | ||
|
||
docker build --build-arg TAG="${TRAVIS_TAG}" -t ${IMAGE_NAME}:latest . | ||
|
||
docker tag ${IMAGE_NAME}:latest ${IMAGE_NAME}:"${TRAVIS_TAG}" | ||
|
||
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin | ||
|
||
docker push ${IMAGE_NAME}:"${TRAVIS_TAG}" | ||
docker push ${IMAGE_NAME}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.