Fix bake jq conditionals
This commit is contained in:
4
.github/workflows/docker-build-publish.yml
vendored
4
.github/workflows/docker-build-publish.yml
vendored
@@ -188,8 +188,8 @@ jobs:
|
|||||||
tags: $tags,
|
tags: $tags,
|
||||||
args: $args
|
args: $args
|
||||||
}
|
}
|
||||||
+ ( ($target != "" and $target != "null") ? {target: $target} : {} )
|
+ (if ($target != "" and $target != "null") then {target: $target} else {} end)
|
||||||
+ ( ($cache_ref != "") ? {"cache-from": ["type=registry,ref=" + $cache_ref], "cache-to": ["type=registry,ref=" + $cache_ref + ",mode=max"]} : {} )')
|
+ (if ($cache_ref != "") then {"cache-from": ["type=registry,ref=" + $cache_ref], "cache-to": ["type=registry,ref=" + $cache_ref + ",mode=max"]} else {} end)')
|
||||||
|
|
||||||
TARGETS_JSON=$(jq -n --arg name "$TARGET_NAME" --argjson target "$TARGET_OBJ" --argjson targets "$TARGETS_JSON" '$targets + {($name): $target}')
|
TARGETS_JSON=$(jq -n --arg name "$TARGET_NAME" --argjson target "$TARGET_OBJ" --argjson targets "$TARGETS_JSON" '$targets + {($name): $target}')
|
||||||
done < <(echo "$group" | jq -c 'to_entries[]')
|
done < <(echo "$group" | jq -c 'to_entries[]')
|
||||||
|
|||||||
Reference in New Issue
Block a user