diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 6eaabbfe..f330e34b 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -16,9 +16,9 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set Docker image tag run: | - | echo "GITHUB_REF = $GITHUB_REF" > version.py - | echo "GITHUB_SHA = $GITHUB_SHA" >> version.py - | + echo "GITHUB_REF = $GITHUB_REF" > version.py + echo "GITHUB_SHA = $GITHUB_SHA" >> version.py + if [[ $GITHUB_REF == refs/heads/main ]]; then echo "DOCKER_IMAGE_TAG=latest" >> $GITHUB_ENV elif [[ $GITHUB_REF == refs/heads/staging ]]; then