Skip to content

Commit

Permalink
Single build unified Taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberdev committed Mar 29, 2024
1 parent 07b9102 commit c50a7f1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tasks/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: '3'

silent: true

tasks:
default:
cmds:
- task: go
- task: release

build:
dir: image
cmds:
- task: go
- |
echo {{.VERSION}} && \
docker build \
--build-arg VERSION={{.VERSION}} \
--platform {{.GAME_ARCH}} \
-t \
{{.REGISTRY}}/{{.REGISTRY_USER}}/{{.GAME}}:latest \
-t \
{{.REGISTRY}}/{{.REGISTRY_USER}}/{{.GAME}}:{{.VERSION}} .
go:
dir: image
cmds:
- go mod tidy

push:
dir: image
cmds:
- |
docker push \
{{.REGISTRY}}/{{.REGISTRY_USER}}/{{.GAME}}:latest
- |
docker push \
{{.REGISTRY}}/{{.REGISTRY_USER}}/{{.GAME}}:{{.VERSION}}
release:
cmds:
- task: build
- task: push

0 comments on commit c50a7f1

Please sign in to comment.