1 parent d66364c commit 0748ac6Copy full SHA for 0748ac6
1 file changed
scripts/lib/gitops-functions.sh
@@ -41,7 +41,7 @@ update_file() {
41
else
42
local field_type
43
field_type=$(yq "(.${field} | type)" "${file}" 2>/dev/null || echo "!!null")
44
- if [[ "${field_type}" == "!!map" ]]; then
+ if [[ "${field_type}" == "!!map" ]] && yq -e ".${field} | (has(\"tag\") or has(\"repository\"))" "${file}" > /dev/null 2>&1; then
45
yq -i ".${field}.tag=\"${INPUT_TAG}\"" "${file}"
46
47
yq -i ."${field}"=\""${image}"\" "${file}"
0 commit comments