From f45fb9a63b9bff2c8a3c1a0bb46fe22016f53b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Novotn=C3=BD?= Date: Mon, 15 Apr 2024 10:56:59 +0200 Subject: [PATCH] ci: attempt to deploy image per MAJOR version (cherry picked from commit a04a56e5722321d560bf489cc2326d7698e74490) --- .github/workflows/docker-latest.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-latest.yml b/.github/workflows/docker-latest.yml index e0163eaa3..a2cf442f4 100644 --- a/.github/workflows/docker-latest.yml +++ b/.github/workflows/docker-latest.yml @@ -40,17 +40,24 @@ jobs: username: ${{ vars.CI_REGISTRY_USER }} password: ${{ secrets.CI_REGISTRY_PASSWORD }} + - name: Extract major version + id: major_version + run: echo "::set-output name=version::$(echo '${{ steps.release_version.outputs.version }}' | cut -d'.' -f1,2)" + - name: Build and push Docker image env: RELEASE_IMAGE: "evitadb:latest" EVITA_JAR_NAME: evita-server.jar + MAJOR_VERSION: ${{ steps.major_version.outputs.version }} uses: docker/build-push-action@v3 with: context: ./docker file: ./docker/Dockerfile pull: true push: true - tags: ${{ vars.CI_REGISTRY_USER }}/${{ env.RELEASE_IMAGE }} + tags: | + ${{ vars.CI_REGISTRY_USER }}/${{ env.RELEASE_IMAGE }} + ${{ vars.CI_REGISTRY_USER }}/evitadb:${{ env.MAJOR_VERSION }} platforms: linux/amd64,linux/arm64/v8 build-args: | - EVITA_JAR_NAME=${{ env.EVITA_JAR_NAME }} \ No newline at end of file + EVITA_JAR_NAME=${{ env.EVITA_JAR_NAME }}