[11.9 port] Fix tagging of asset images
Backports of MRs https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26029 and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26217 to 11.9.x. This is needed for Helm chart releases to work in 11.9.x series.