diff --git a/.github/workflows/build_images.yml b/.github/workflows/build_images.yml index 9456e0e..c5c28f0 100644 --- a/.github/workflows/build_images.yml +++ b/.github/workflows/build_images.yml @@ -12,7 +12,7 @@ jobs: build_docker_images: runs-on: 'ubuntu-20.04' env: - latest_python: '3.11' + latest: ${{ matrix.python_version == '3.11' && true || false }} strategy: matrix: python_version: @@ -22,6 +22,9 @@ jobs: - '3.10' - '3.11' steps: + - name: debug + run: echo '${{ env.latest }}';echo ${{ env.latest && 'yes' || 'no' }} + - name: 'Checkout repository' uses: actions/checkout@v4 @@ -52,8 +55,8 @@ jobs: tags: | ${{ env.IMAGE_NAME }}:latest-python${{ matrix.python_version }} ${{ env.IMAGE_NAME }}:${{ github.ref_name }}-python${{ matrix.python_version }} - ${{ (matrix.python_version == env.latest_python) && format('{0}:{1}', env.IMAGE_NAME, github.ref_name) || '' }} - ${{ (matrix.python_version == env.latest_python) && format('{0}:latest', env.IMAGE_NAME) || '' }} + ${{ env.latest && format('{0}:{1}', env.IMAGE_NAME, github.ref_name) || '' }} + ${{ env.latest && format('{0}:latest', env.IMAGE_NAME) || '' }} cache-from: | type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new