Scan for updates to new images (#466)

Co-authored-by: Marco Franssen <[email protected]>
This commit is contained in:
kfox1111
2023-08-22 12:05:44 -07:00
committed by GitHub
co-authored by Marco Franssen
parent 7a5456e404
commit d91403af3a
3 changed files with 17 additions and 4 deletions
+6 -3
View File
@@ -46,10 +46,13 @@ jq -r '. | keys[]' "$IMAGEJSON" | while read -r CHART; do
REGISTRY=$(yq e ".${QUERY}.registry" "$VALUES")
REPOSITORY=$(yq e ".${QUERY}.repository" "$VALUES")
VERSION=$(yq e ".${QUERY}.tag" "$VALUES")
if [[ "$REGISTRY" != "" ]]; then
REGISTRY="$REGISTRY/"
fi
if [[ "$FILTER" == "LATESTSHA" ]]; then
LATEST_VERSION="latest@"$(crane digest "${REGISTRY}/${REPOSITORY}:latest")
LATEST_VERSION="latest@"$(crane digest "${REGISTRY}${REPOSITORY}:latest")
else
LATEST_VERSION=$(crane ls "${REGISTRY}/${REPOSITORY}" | grep "${FILTER}" | sort "${SORTFLAGS[@]}"| tail -n 1)
LATEST_VERSION=$(crane ls "${REGISTRY}${REPOSITORY}" | grep "${FILTER}" | sort "${SORTFLAGS[@]}" | tail -n 1)
fi
export QUERY
@@ -57,7 +60,7 @@ jq -r '. | keys[]' "$IMAGEJSON" | while read -r CHART; do
export LATEST_VERSION
if [ "${VERSION}" != "${LATEST_VERSION}" ]; then
echo "New image version found: ${REGISTRY}/${REPOSITORY}:${LATEST_VERSION}"
echo "New image version found: ${REGISTRY}${REPOSITORY}:${LATEST_VERSION}"
"${SCRIPTPATH}/edit-yaml.py" > /tmp/$$
mv /tmp/$$ "${VALUES}"
fi
+10
View File
@@ -39,6 +39,16 @@
"query": "tests.bash.image",
"filter": "LATESTSHA",
"sort-flags": []
},
{
"query": "tests.toolkit.image",
"filter": "LATESTSHA",
"sort-flags": []
},
{
"query": "tests.busybox.image",
"filter": "^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+-uclibc$",
"sort-flags": ["-t", ".", "-k1,1n", "-k2,2n", "-k3,3n"]
}
],
"tornjak-frontend/values.yaml": [
+1 -1
View File
@@ -47,7 +47,7 @@ jobs:
go install github.com/mikefarah/yq/v4@latest
sudo apt-get install wget apt-transport-https gnupg lsb-release
sudo pip install -r .github/scripts/requirements.txt
pip install -r .github/scripts/requirements.txt
./.github/scripts/update-tags.sh
git diff