From 9df715ee2536725be24a3f9bde768f4ff48d334f Mon Sep 17 00:00:00 2001 From: Quentin Pismont Date: Thu, 10 Aug 2023 21:19:40 +0200 Subject: [PATCH] use version file --- .woodpecker.yml | 5 +++-- version | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 version diff --git a/.woodpecker.yml b/.woodpecker.yml index 1fcd547..0ce3bc3 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,9 +2,10 @@ steps: publish-docker: image: docker:cli commands: + - version=$(cat version) - docker login gitea.qpismont.fr -u="$${DOCKER_USERNAME}" -p="$${DOCKER_PASSWORD}" - - docker build . --tag gitea.qpismont.fr/qpismont/portfolio:latest - - docker push gitea.qpismont.fr/qpismont/portfolio:latest + - docker build . --tag gitea.qpismont.fr/qpismont/portfolio:${version} + - docker push gitea.qpismont.fr/qpismont/portfolio:${version} when: branch: ${CI_REPO_DEFAULT_BRANCH} event: push diff --git a/version b/version new file mode 100644 index 0000000..9f8e9b6 --- /dev/null +++ b/version @@ -0,0 +1 @@ +1.0 \ No newline at end of file