From 1dd893e208687230d7af17c055105519cb18f482 Mon Sep 17 00:00:00 2001 From: Arthur Meyre Date: Wed, 10 Nov 2021 09:02:59 +0100 Subject: [PATCH] chore: select latest env image for timestamp check - otherwise we can get preflight images --- script/actions_utils/timestamp_check_update_container.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/actions_utils/timestamp_check_update_container.sh b/script/actions_utils/timestamp_check_update_container.sh index 26afb218d..0dfda9bae 100755 --- a/script/actions_utils/timestamp_check_update_container.sh +++ b/script/actions_utils/timestamp_check_update_container.sh @@ -57,7 +57,8 @@ ENV_JSON=$(curl \ -H "Authorization: token ${TOKEN}" \ "${ENV_IMG_ENDPOINT_URL}") -LATEST_ENV_IMG_JSON=$(echo "${ENV_JSON}" | jq -rc 'sort_by(.updated_at)[-1]') +LATEST_ENV_IMG_JSON=$(echo "${ENV_JSON}" | \ +jq -rc '.[] | select(.metadata.container.tags[] | contains("latest"))') ENV_IMG_TAG=$(echo "${LATEST_ENV_IMG_JSON}" | \ jq -rc '.metadata.container.tags - ["latest"] | .[0]')