sh:if test -z "{{.GIT_TAG}}"; then echo "{{.GIT_COMMIT}}"; elif test -n "{{.GIT_TAG}}"; then echo "{{.GIT_TAG}}"; else echo "dirty"; fi
sh:if test "{{.GIT_DIRTY}}" != ""; then echo "{{.GIT_COMMIT}}-dirty"; elif test "{{.GIT_TAG}}" != ""; then echo "{{.GIT_TAG}}"; else echo "{{.GIT_COMMIT}}"; fi
tasks:
default:
@ -14,6 +16,10 @@ tasks:
- task:volume
- task:podman
version:
cmds:
- echo "{{.VERSION}}"
volume:
run:"once"
cmds:
@ -64,7 +70,7 @@ tasks:
cmds:
- podman tag docker.io/pcdummy/go-micro-router:latest docker.io/pcdummy/go-micro-router:{{.GIT_TAG}}
status:
- test -z "{{.GIT_TAG}}"
- test "{{.VERSION}}" != "{{.GIT_TAG}}"
podman:
desc:Generate docker container for go-micro-router tagged as docker.io/pcdummy/go-micro-router:latest and :GIT_TAG if theres a tag
@ -72,6 +78,16 @@ tasks:
- task:build:podman
- task:tag:podman
publish:
desc:Publish images to docker.io, this requires the current commit to be a git tag