chore: check latest base image is strictly newer

- otherwise we try to open PRs for no good reason (thankfully no diffs
means the PR is not opened)
This commit is contained in:
Arthur Meyre
2021-11-10 10:08:33 +01:00
parent 1dd893e208
commit 8a91760b12

View File

@@ -86,7 +86,7 @@ CURRENT_BASE_IMG_DATE=$(date -d "${CURRENT_BASE_IMG_TIMESTAMP}" +%s)
echo "Base epoch: ${LATEST_BASE_IMG_TIMESTAMP}"
echo "Env epoch: ${CURRENT_BASE_IMG_DATE}"
if [[ "${LATEST_BASE_IMG_TIMESTAMP}" -ge "${CURRENT_BASE_IMG_DATE}" ]]; then
if [[ "${LATEST_BASE_IMG_TIMESTAMP}" -gt "${CURRENT_BASE_IMG_DATE}" ]]; then
echo "Env image out of date, sending rebuild request."
NEW_BASE_IMG_TAG=$(echo "${LATEST_BASE_IMG_JSON}" | \
jq -rc '.metadata.container.tags - ["latest"] | .[0]')