Skip to content

Commit

Permalink
open source fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nnqq committed Jul 17, 2021
1 parent 7aabfa6 commit 37dec9a
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 30 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ jobs:
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: nnqq
username: leaq-ru
password: ${{ secrets.GH_CI_TOKEN }}
registry: ghcr.io
repository: ${{ github.repository }}
tag_with_ref: true
build_args: GH_CI_TOKEN=${{ secrets.GH_CI_TOKEN }}

- name: Extract service name
uses: bluwy/substitute-string-action@v1
id: substr
with:
_input-text: ${{ github.repository }}
nnqq/scr-: ''
leaq-ru/: ''

- name: Install doctl
uses: digitalocean/action-doctl@v2
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
FROM golang:1.15-alpine AS build
ARG GH_CI_TOKEN=$GH_CI_TOKEN
WORKDIR /app
COPY / /app
ENV GOPRIVATE="github.com/nnqq/*"
RUN apk add --no-cache git
RUN git config --global url."https://nnqq:$GH_CI_TOKEN@github.com/".insteadOf "https://github.com/"
RUN go build -o servicebin

FROM alpine:latest
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 LEAQ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# admin-bot
https://github.com/leaq-ru/about
4 changes: 2 additions & 2 deletions bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"
"fmt"
"github.com/leaq-ru/proto/codegen/go/event"
"github.com/leaq-ru/proto/codegen/go/parser"
"github.com/nats-io/stan.go"
"github.com/nnqq/scr-proto/codegen/go/event"
"github.com/nnqq/scr-proto/codegen/go/parser"
"github.com/rs/zerolog"
"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/encoding/protojson"
Expand Down
2 changes: 1 addition & 1 deletion call/new_clients.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package call

import (
"github.com/nnqq/scr-proto/codegen/go/parser"
"github.com/leaq-ru/proto/codegen/go/parser"
"google.golang.org/grpc"
)

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/nnqq/scr-admin-bot
module github.com/leaq-ru/admin-bot

go 1.16

require (
github.com/google/uuid v1.1.2
github.com/kelseyhightower/envconfig v1.4.0
github.com/leaq-ru/lib-graceful v1.0.1
github.com/leaq-ru/proto v1.23.6
github.com/nats-io/nats-server/v2 v2.3.2 // indirect
github.com/nats-io/nats-streaming-server v0.22.0 // indirect
github.com/nats-io/stan.go v0.9.0
github.com/nnqq/scr-lib-graceful v1.0.0
github.com/nnqq/scr-proto v1.22.9
github.com/rs/zerolog v1.23.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/grpc v1.38.0
Expand Down
13 changes: 4 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.11.12 h1:famVnQVu7QwryBN4jNseQdUKES71ZAOnB6UQQJPZvqk=
github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/leaq-ru/lib-graceful v1.0.1 h1:8N6Gnz4wCkpLW4nDOTQ39EZU5DRrH/JmtpNdqI9XAyk=
github.com/leaq-ru/lib-graceful v1.0.1/go.mod h1:F0n189lXn6CKNAM3B6lnuDdTDe5jzXNfoeqDa2ZRC9s=
github.com/leaq-ru/proto v1.23.6 h1:ZFR9YVtJ39ql+GQR3T0tRRLIPVrZPXetzykWSzfQY2Y=
github.com/leaq-ru/proto v1.23.6/go.mod h1:mLawSu374CD1aVyF3tSaQ5uRvYeOkSoE+n1p1RBMkpE=
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
Expand Down Expand Up @@ -101,12 +105,6 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nats-io/stan.go v0.9.0 h1:TB73Y31au++0sU0VmnBy2pYkSrwH0zUFNRB9YePHqC4=
github.com/nats-io/stan.go v0.9.0/go.mod h1:0jEuBXKauB1HHJswHM/lx05K48TJ1Yxj6VIfM4k+aB4=
github.com/nnqq/scr-lib-graceful v1.0.0 h1:Rwj3HYGq4u9LHto6Sl9oNxVwTasGJWfk5Ut4k0lxV+M=
github.com/nnqq/scr-lib-graceful v1.0.0/go.mod h1:/2o2N5m9iXXKMxZXF108U3vqy0o0FLoqJcAYIG3n+Ec=
github.com/nnqq/scr-proto v1.22.8 h1:OPMjDki/aYS+vzgcan12KefYn73mKeX08aWP+lqIk1s=
github.com/nnqq/scr-proto v1.22.8/go.mod h1:gN6hMpPZeeiwvv/3w9NwvXR1xOQaXEqREbKvE+HXOk0=
github.com/nnqq/scr-proto v1.22.9 h1:73QTYbqouq5fEURxzXuKJDS/1eBjMV/EYRICalPoU5Q=
github.com/nnqq/scr-proto v1.22.9/go.mod h1:gN6hMpPZeeiwvv/3w9NwvXR1xOQaXEqREbKvE+HXOk0=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down Expand Up @@ -158,7 +156,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
Expand All @@ -180,8 +177,6 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
14 changes: 7 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"context"
"github.com/nnqq/scr-admin-bot/bot"
"github.com/nnqq/scr-admin-bot/call"
"github.com/nnqq/scr-admin-bot/config"
"github.com/nnqq/scr-admin-bot/healthz"
"github.com/nnqq/scr-admin-bot/logger"
"github.com/nnqq/scr-admin-bot/stan"
graceful "github.com/nnqq/scr-lib-graceful"
"github.com/leaq-ru/admin-bot/bot"
"github.com/leaq-ru/admin-bot/call"
"github.com/leaq-ru/admin-bot/config"
"github.com/leaq-ru/admin-bot/healthz"
"github.com/leaq-ru/admin-bot/logger"
"github.com/leaq-ru/admin-bot/stan"
graceful "github.com/leaq-ru/lib-graceful"
"log"
"sync"
)
Expand Down

0 comments on commit 37dec9a

Please sign in to comment.