From b36c1e812f3fd32e5066c078f35806e518bb3e7b Mon Sep 17 00:00:00 2001 From: SYusupov Date: Tue, 17 Sep 2024 13:54:00 +0200 Subject: [PATCH] Fixing env variables --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 621262d..359e7f7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,6 +64,7 @@ jobs: # Clean up Docker system after building and pushing the image - name: Clean up Docker + if: ${{ env.TO_BUILD_DOCKER == true }} run: | docker system prune -af --volumes @@ -115,12 +116,12 @@ jobs: run: | DOCKERHUB_USERNAME="${{ secrets.DOCKERHUB_USERNAME }}" - if [ env.TO_BUILD_DOCKER == true ]; then + if [ $TO_BUILD_DOCKER == true ]; then # dynamically set the image tag based on the commit ID DOCKER_IMAGE_TAG=$(git rev-parse HEAD) else # Define the Docker image tag manually - DOCKER_IMAGE_TAG=env.PREV_IMAGE_TAG + DOCKER_IMAGE_TAG=$PREV_IMAGE_TAG fi # Write the variables to the .env file