Skip to content

Commit

Permalink
Merge pull request #153 from lazybytez/feature/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies and disable deployment
  • Loading branch information
pascal-zarrad authored Apr 19, 2024
2 parents fe3047e + 65ea69c commit 9a0a0dd
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 189 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
IS_CI: true
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.22.2

- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -26,9 +26,9 @@ jobs:
run: make install

- name: Run Go linters
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.50.1
version: v1.57.2
skip-cache: true

tests:
Expand All @@ -37,9 +37,9 @@ jobs:
IS_CI: true
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.22.2

- name: Checkout repository
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

# Attempts to build language.
# If this fails, we need to remove autobuild and build manually with a shell script
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
23 changes: 12 additions & 11 deletions .github/workflows/deploy_edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ jobs:
build_commit_sha=${{ steps.commit_sha.outputs.short }}
# Handle stage deployment
- name: Mask hidden URLs
run: |
echo "::add-mask::${{ secrets.APP_URL }}"
echo "::add-mask::${{ secrets.SSH_URL }}"
- name: Do deployment
uses: dokku/github-action@master
with:
git_remote_url: ${{ secrets.DEPLOYMENT_HOST }}
ssh_private_key: ${{ secrets.DEPLOYMENT_KEY }}
ssh_host_key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
deploy_docker_image: "ghcr.io/lazybytez/jojo-discord-bot@${{ steps.build_push.outputs.digest }}"
# Currently disdabled
# - name: Mask hidden URLs
# run: |
# echo "::add-mask::${{ secrets.APP_URL }}"
# echo "::add-mask::${{ secrets.SSH_URL }}"
# - name: Do deployment
# uses: dokku/github-action@master
# with:
# git_remote_url: ${{ secrets.DEPLOYMENT_HOST }}
# ssh_private_key: ${{ secrets.DEPLOYMENT_KEY }}
# ssh_host_key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
# deploy_docker_image: "ghcr.io/lazybytez/jojo-discord-bot@${{ steps.build_push.outputs.digest }}"
21 changes: 11 additions & 10 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ jobs:
build_commit_sha=${{ steps.commit_sha.outputs.short }}
# Handle prod deployment
- name: Mask hidden URLs
run: |
echo "::add-mask::${{ secrets.SSH_URL }}"
- name: Do deployment
uses: dokku/github-action@master
with:
git_remote_url: ${{ secrets.DEPLOYMENT_HOST }}
ssh_private_key: ${{ secrets.DEPLOYMENT_KEY }}
ssh_host_key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
deploy_docker_image: "ghcr.io/lazybytez/jojo-discord-bot@${{ steps.build_push.outputs.digest }}"
# Currently disdabled
# - name: Mask hidden URLs
# run: |
# echo "::add-mask::${{ secrets.SSH_URL }}"
# - name: Do deployment
# uses: dokku/github-action@master
# with:
# git_remote_url: ${{ secrets.DEPLOYMENT_HOST }}
# ssh_private_key: ${{ secrets.DEPLOYMENT_KEY }}
# ssh_host_key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
# deploy_docker_image: "ghcr.io/lazybytez/jojo-discord-bot@${{ steps.build_push.outputs.digest }}"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test:
# Lints the code
.PHONY: lint
lint:
docker run --rm -v $(CURRENT_DIR):/app -w /app golangci/golangci-lint:v1.49.0 golangci-lint run -v
docker run --rm -v $(CURRENT_DIR):/app -w /app golangci/golangci-lint:v1.57.2 golangci-lint run -v

# === OpenAPI ===
# =========================
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ This is an open source Discord bot mainly developed by [Lazy Bytez][gh-team].
If you want to take part in the development of the bot please check out
the [Contributing](https://github.com/lazybytez/jojo-discord-bot#contributing) section.

Open source doesn't mean everyone can do whatever they want with the bot so there is a
strict [LICENSE](https://github.com/lazybytez/jojo-discord-bot/blob/main/LICENSE) we want you to respect.

## Getting started

### Requirements
Expand Down
11 changes: 6 additions & 5 deletions components/statistics/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ package statistics
import (
"bytes"
"fmt"
"github.com/bwmarrin/discordgo"
"github.com/dustin/go-humanize"
"github.com/lazybytez/jojo-discord-bot/api"
"github.com/lazybytez/jojo-discord-bot/build"
"io"
"runtime"
"text/tabwriter"
"time"

"github.com/bwmarrin/discordgo"
"github.com/dustin/go-humanize"
"github.com/lazybytez/jojo-discord-bot/api"
"github.com/lazybytez/jojo-discord-bot/build"
)

// statsCommand registers the alias /stats
Expand Down Expand Up @@ -90,7 +91,7 @@ func buildInfoEmbed(s *discordgo.Session) []*discordgo.MessageEmbed {
},
{
Name: "Links",
Value: "[GitHub](https://github.com/lazybytez/jojo-discord-bot)",
Value: "[GitHub / Source](https://github.com/lazybytez/jojo-discord-bot)",
},
},
},
Expand Down
80 changes: 42 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,74 +1,78 @@
module github.com/lazybytez/jojo-discord-bot

go 1.19
go 1.22.2

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/bwmarrin/discordgo v0.27.1
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/bwmarrin/discordgo v0.28.1
github.com/davecgh/go-spew v1.1.1
github.com/dustin/go-humanize v1.0.1
github.com/gin-gonic/gin v1.9.0
github.com/gin-gonic/gin v1.9.1
github.com/go-redis/cache/v8 v8.4.4
github.com/go-redis/redis/v8 v8.11.5
github.com/joho/godotenv v1.5.1
github.com/rs/zerolog v1.29.1
github.com/rs/zerolog v1.32.0
github.com/rzajac/zltest v0.12.0
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.9.0
github.com/swaggo/files v1.0.1
github.com/swaggo/gin-swagger v1.6.0
github.com/swaggo/swag v1.16.1
gorm.io/driver/postgres v1.5.0
gorm.io/driver/sqlite v1.5.0
gorm.io/gorm v1.25.1
github.com/swaggo/swag v1.16.3
gorm.io/driver/postgres v1.5.7
gorm.io/driver/sqlite v1.5.5
gorm.io/gorm v1.25.9
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/bytedance/sonic v1.8.8 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/bytedance/sonic v1.11.5 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudwego/base64x v0.1.3 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.13.0 // indirect
github.com/go-playground/validator/v10 v10.19.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
github.com/jackc/pgx/v5 v5.5.5 // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-sqlite3 v1.14.16 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v1.14.22 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.9.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 9a0a0dd

Please sign in to comment.