From f71e53a2a3c336833f233d4581528731df93ebd2 Mon Sep 17 00:00:00 2001 From: Adrien Perrin Date: Mon, 11 Dec 2023 14:50:38 +0100 Subject: [PATCH] build: test for latest only once --- .github/workflows/build_images.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_images.yml b/.github/workflows/build_images.yml index 9456e0e..be43c04 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' || '' }} strategy: matrix: python_version: @@ -52,8 +52,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