mirror of
https://github.com/MedzikUser/go-pingbot
synced 2024-08-14 23:57:07 +00:00
fix: add github token to auto updater
- Added GitHub Token to auto updater - Upgrade go-utils
This commit is contained in:
parent
4095092cca
commit
cdefd28df7
5 changed files with 10 additions and 1 deletions
|
@ -1,2 +1,5 @@
|
|||
# MongoDB
|
||||
MONGODB_URI=mongodb+srv://...
|
||||
|
||||
# GitHub
|
||||
GH_TOKEN=ghp_
|
||||
|
|
|
@ -11,4 +11,7 @@ var (
|
|||
Mongo_URI = os.Getenv("MONGODB_URI")
|
||||
Mongo_DB = os.Getenv("MONGODB_DB")
|
||||
Mongo_Collection = os.Getenv("MONGODB_COLLECTION")
|
||||
|
||||
// github
|
||||
GH_Token = os.Getenv("GH_TOKEN")
|
||||
)
|
||||
|
|
2
go.mod
2
go.mod
|
@ -4,7 +4,7 @@ go 1.16
|
|||
|
||||
require (
|
||||
github.com/BurntSushi/toml v0.4.1
|
||||
github.com/MedzikUser/go-utils v0.3.0
|
||||
github.com/MedzikUser/go-utils v0.3.1
|
||||
github.com/gin-contrib/cors v1.3.1
|
||||
github.com/gin-gonic/gin v1.7.4
|
||||
github.com/go-playground/validator/v10 v10.9.0 // indirect
|
||||
|
|
2
go.sum
2
go.sum
|
@ -39,6 +39,8 @@ github.com/MedzikUser/go-github-selfupdate v1.3.1 h1:PlLrOMEucL8B2LNRUaceAgvu17J
|
|||
github.com/MedzikUser/go-github-selfupdate v1.3.1/go.mod h1:vq1/KNWXN7R/aKZFD5p2rsIdQ+2FSXnlIts1QHEZCM4=
|
||||
github.com/MedzikUser/go-utils v0.3.0 h1:VE8s5toEViJhYj3x73iD6HGDM3LseppvLikUcfhcZVM=
|
||||
github.com/MedzikUser/go-utils v0.3.0/go.mod h1:xP+KbYBL9TESTLP4vWnvIT0v+uq5reR4l5S7Nq4eeKo=
|
||||
github.com/MedzikUser/go-utils v0.3.1 h1:hkXn3BvMq0WemIm6+6cnm9D2XHHFlSUcwodFNPwW9UI=
|
||||
github.com/MedzikUser/go-utils v0.3.1/go.mod h1:xP+KbYBL9TESTLP4vWnvIT0v+uq5reR4l5S7Nq4eeKo=
|
||||
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
||||
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
|
|
1
main.go
1
main.go
|
@ -41,6 +41,7 @@ func main() {
|
|||
|
||||
client := updater.Client{
|
||||
GitHub: config.GH_Repo,
|
||||
GitHubToken: config.GH_Token,
|
||||
CheckEvery: config.Toml.AutoUpdate.Check * time.Minute,
|
||||
Version: config.Version,
|
||||
Binary: "pingbot.out",
|
||||
|
|
Loading…
Reference in a new issue