From 4641bcc7feaf673875a9713029e62a199b628e64 Mon Sep 17 00:00:00 2001 From: sergey filyanin Date: Thu, 29 Aug 2024 22:40:45 +0200 Subject: [PATCH] Update docker.yml --- .github/workflows/docker.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0fb1fee868..90d7145f11 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -37,13 +37,21 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set Docker tag + id: set-docker-tag + run: | + if [ "${GITHUB_REF##*/}" == "main" ]; then + echo "tag=latest" >> $GITHUB_ENV + else + echo "tag=qa" >> $GITHUB_ENV + fi + - name: Build and push Dashboard image uses: docker/build-push-action@master with: file: Dockerfile push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.tag }} deploy-dashboard-k8s: needs: [build-and-push-dashboard-image]