Update .forgejo/workflows/build-images.yaml

This commit is contained in:
Tommy 2025-01-03 15:50:47 +00:00
parent 4a0de465c6
commit b3265a20b6
Signed by: Mooo[bot]
GPG key ID: CF3AFE4D5B62BB9A

View file

@ -39,20 +39,18 @@ jobs:
echo "Parsing channels from $metadata_file..."
cat "$metadata_file" | yq '.channels | length'
# First, get the total channel count:
channel_count=$(cat "$metadata_file" | yq '.channels | length')
# We'll build the array in bash:
result="["
for i in $(seq 0 $((channel_count - 1))); do
channel_name=$(yq e ".channels[$i].name" "$metadata_file")
channel_name=$(cat "$metadata_file" | yq ".channels[$i].name" )
# Number of platforms in this channel:
platform_count=$(yq e ".channels[$i].platforms | length" "$metadata_file")
platform_count=$(cat "$metadata_file" | yq e ".channels[$i].platforms | length")
for j in $(seq 0 $((platform_count - 1))); do
platform=$(yq e ".channels[$i].platforms[$j]" "$metadata_file")
platform=$(cat "$metadata_file" | yq ".channels[$i].platforms[$j]")
# Append JSON object
result="${result}{\"channel\":\"${channel_name}\",\"platform\":\"${platform}\"},"