ci(build): add version number on build
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
ca5f84d1be
commit
534c4f83ad
|
@ -2,6 +2,8 @@ pipeline:
|
|||
tests:
|
||||
image: golang:1.18
|
||||
commands:
|
||||
- test -n "$CI_COMMIT_TAG" && sed "s/{app_version}/$CI_COMMIT_TAG/g" -i main.go || true
|
||||
- test -n "$CI_COMMIT_SHA" && sed "s/{app_version}/${CI_COMMIT_TAG:0:7}/g" -i main.go || true
|
||||
- make test
|
||||
|
||||
build_push_latest_gitnet:
|
||||
|
@ -16,7 +18,6 @@ pipeline:
|
|||
password:
|
||||
from_secret: registry_password
|
||||
when:
|
||||
branch: [master, develop, feature/*]
|
||||
event: [push]
|
||||
|
||||
build_push_tag_gitnet:
|
||||
|
@ -44,7 +45,6 @@ pipeline:
|
|||
password:
|
||||
from_secret: registry_docker_password
|
||||
when:
|
||||
branch: [master]
|
||||
event: [push]
|
||||
|
||||
build_push_tag_dhub:
|
||||
|
|
Loading…
Reference in a new issue