use version file

This commit is contained in:
Quentin Pismont 2023-08-10 21:19:40 +02:00
parent c33a017b16
commit 9df715ee25
2 changed files with 4 additions and 2 deletions

View file

@ -2,9 +2,10 @@ steps:
publish-docker: publish-docker:
image: docker:cli image: docker:cli
commands: commands:
- version=$(cat version)
- docker login gitea.qpismont.fr -u="$${DOCKER_USERNAME}" -p="$${DOCKER_PASSWORD}" - docker login gitea.qpismont.fr -u="$${DOCKER_USERNAME}" -p="$${DOCKER_PASSWORD}"
- docker build . --tag gitea.qpismont.fr/qpismont/portfolio:latest - docker build . --tag gitea.qpismont.fr/qpismont/portfolio:${version}
- docker push gitea.qpismont.fr/qpismont/portfolio:latest - docker push gitea.qpismont.fr/qpismont/portfolio:${version}
when: when:
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
event: push event: push

1
version Normal file
View file

@ -0,0 +1 @@
1.0