Skip to content

Commit f71e53a

Browse files
committed
build: test for latest only once
1 parent c34e64e commit f71e53a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build_images.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build_docker_images:
1313
runs-on: 'ubuntu-20.04'
1414
env:
15-
latest_python: '3.11'
15+
latest: ${{ matrix.python_version == '3.11' && 'true' || '' }}
1616
strategy:
1717
matrix:
1818
python_version:
@@ -52,8 +52,8 @@ jobs:
5252
tags: |
5353
${{ env.IMAGE_NAME }}:latest-python${{ matrix.python_version }}
5454
${{ env.IMAGE_NAME }}:${{ github.ref_name }}-python${{ matrix.python_version }}
55-
${{ (matrix.python_version == env.latest_python) && format('{0}:{1}', env.IMAGE_NAME, github.ref_name) || '' }}
56-
${{ (matrix.python_version == env.latest_python) && format('{0}:latest', env.IMAGE_NAME) || '' }}
55+
${{ env.latest && format('{0}:{1}', env.IMAGE_NAME, github.ref_name) || '' }}
56+
${{ env.latest && format('{0}:latest', env.IMAGE_NAME) || '' }}
5757
cache-from: |
5858
type=local,src=/tmp/.buildx-cache
5959
cache-to: type=local,dest=/tmp/.buildx-cache-new

0 commit comments

Comments
 (0)