mirror of
https://github.com/onyx-and-iris/q3rcon-proxy.git
synced 2025-04-02 03:43:50 +01:00
add docker tasks
This commit is contained in:
parent
1bbe3102ce
commit
916d2a2d86
9
.gitignore
vendored
9
.gitignore
vendored
@ -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:
|
# 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
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||||
#
|
#
|
||||||
@ -20,10 +22,7 @@ bin/
|
|||||||
|
|
||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
|
# End of gignore: github.com/onyx-and-iris/gignore
|
||||||
|
|
||||||
# Added by goreleaser init:
|
# Added by goreleaser init:
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
# testing
|
|
||||||
run.sh
|
|
||||||
server.yaml
|
|
@ -1,5 +1,8 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
|
includes:
|
||||||
|
docker: ./docker/Taskfile.docker.yml
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
PROGRAM: q3rcon-proxy
|
PROGRAM: q3rcon-proxy
|
||||||
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
|
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
|
||||||
@ -38,11 +41,13 @@ tasks:
|
|||||||
desc: Build the q3rcon-proxy project for Windows
|
desc: Build the q3rcon-proxy project for Windows
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.Version={{.GIT_COMMIT}}" ./cmd/{{.PROGRAM}}/
|
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.Version={{.GIT_COMMIT}}" ./cmd/{{.PROGRAM}}/
|
||||||
|
internal: true
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
desc: Build the q3rcon-proxy project for Linux
|
desc: Build the q3rcon-proxy project for Linux
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.Version={{.GIT_COMMIT}}" ./cmd/{{.PROGRAM}}/
|
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.Version={{.GIT_COMMIT}}" ./cmd/{{.PROGRAM}}/
|
||||||
|
internal: true
|
||||||
|
|
||||||
test:
|
test:
|
||||||
desc: Run tests
|
desc: Run tests
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.21 AS build_image
|
FROM golang:1.24 AS build_image
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
23
docker/Taskfile.docker.yml
Normal file
23
docker/Taskfile.docker.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
build:
|
||||||
|
desc: Build the Docker image
|
||||||
|
cmds:
|
||||||
|
- docker build -t q3rcon-proxy -f docker/Dockerfile .
|
||||||
|
dir: .
|
||||||
|
|
||||||
|
login:
|
||||||
|
desc: Login to Github Container Registry
|
||||||
|
cmds:
|
||||||
|
- docker login ghcr.io -u onyx-and-iris --password-stdin <<< {{.GHCR_TOKEN}}
|
||||||
|
internal: true
|
||||||
|
|
||||||
|
push:
|
||||||
|
desc: Push the Docker image to Github Container Registry
|
||||||
|
deps:
|
||||||
|
- task: build
|
||||||
|
- task: login
|
||||||
|
cmds:
|
||||||
|
- docker tag q3rcon-proxy ghcr.io/onyx-and-iris/q3rcon-proxy:latest
|
||||||
|
- docker push ghcr.io/onyx-and-iris/q3rcon-proxy:latest
|
Loading…
x
Reference in New Issue
Block a user