ci: cache: Add tag character filtering

- Container image tags can only contain alphanumeric, period,
hyphen and underscore characters, so convert characters outside
of these to be underscores, to avoid having invalid tag failures

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman 2024-05-16 17:16:21 +01:00
parent a98b1e3afb
commit ce24e98358

View File

@ -1148,6 +1148,8 @@ handle_build() {
echo "Pushing ${build_target} with tags: ${tags[*]}"
for tag in "${tags[@]}"; do
# tags can only contain lowercase and uppercase letters, digits, underscores, periods, and hyphens
tag=("$(echo ${tag} | tr -c '[a-zA-Z0-9\_\.\-]' _)")
case ${build_target} in
kernel-nvidia-gpu)
sudo oras push \