Compare commits

...

4 Commits
v1.5.0 ... dev

Author SHA1 Message Date
16e5e9c010 upd vars 2025-03-16 01:34:01 +00:00
916d2a2d86 add docker tasks 2025-03-16 01:04:16 +00:00
github-actions[bot]
1bbe3102ce chore: auto-update Go modules 2025-03-10 00:07:55 +00:00
github-actions[bot]
f1762cf3ad chore: auto-update Go modules 2025-02-24 00:09:17 +00:00
6 changed files with 42 additions and 9 deletions

9
.gitignore vendored
View File

@ -1,3 +1,5 @@
# Auto-generated .gitignore by gignore: github.com/onyx-and-iris/gignore
### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
@ -20,10 +22,7 @@ bin/
# Go workspace file
go.work
# End of gignore: github.com/onyx-and-iris/gignore
# Added by goreleaser init:
dist/
# testing
run.sh
server.yaml
dist/

View File

@ -1,5 +1,8 @@
version: '3'
includes:
docker: ./docker/Taskfile.docker.yml
vars:
PROGRAM: q3rcon-proxy
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
@ -38,11 +41,13 @@ tasks:
desc: Build the q3rcon-proxy project for Windows
cmds:
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.Version={{.GIT_COMMIT}}" ./cmd/{{.PROGRAM}}/
internal: true
build-linux:
desc: Build the q3rcon-proxy project for Linux
cmds:
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.Version={{.GIT_COMMIT}}" ./cmd/{{.PROGRAM}}/
internal: true
test:
desc: Run tests

View File

@ -1,4 +1,4 @@
FROM golang:1.21 AS build_image
FROM golang:1.24 AS build_image
WORKDIR /usr/src/app

View File

@ -0,0 +1,26 @@
version: '3'
vars:
IMAGE: q3rcon-proxy
tasks:
build:
desc: Build the Docker image
cmds:
- docker build -t {{.IMAGE}} -f docker/Dockerfile .
dir: .
login:
desc: Login to Github Container Registry
cmds:
- docker login ghcr.io -u {{.GHCR_USER}} --password-stdin <<< {{.GHCR_TOKEN}}
internal: true
push:
desc: Push the Docker image to Github Container Registry
deps:
- task: build
- task: login
cmds:
- docker tag {{.IMAGE}} ghcr.io/{{.GHCR_USER}}/{{.IMAGE}}:latest
- docker push ghcr.io/{{.GHCR_USER}}/{{.IMAGE}}:latest

6
go.mod
View File

@ -1,7 +1,9 @@
module github.com/onyx-and-iris/q3rcon-proxy
go 1.18
go 1.24.0
toolchain go1.24.1
require github.com/sirupsen/logrus v1.9.3
require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
require golang.org/x/sys v0.31.0 // indirect

3
go.sum
View File

@ -8,8 +8,9 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=