diff --git a/.forgejo/workflows/build-images.yaml b/.forgejo/workflows/build-images.yaml index 283c208..ad7b4af 100644 --- a/.forgejo/workflows/build-images.yaml +++ b/.forgejo/workflows/build-images.yaml @@ -34,23 +34,10 @@ jobs: exit 1 fi - # We want a JSON array of objects like: - # [ - # {"channel":"stable","platform":"linux/amd64"}, - # {"channel":"beta","platform":"linux/amd64"}, - # {"channel":"beta","platform":"linux/arm64"} - # ] - # We'll parse channels[].name and channels[].platforms[]. - echo "Parsing channels from $metadata_file..." - # We'll produce a JSON array using yq + bash: - # for each channel in .channels[], take channel.name as "channel", - # and for each p in channel.platforms, create an object { channel, platform }. - # You can do it purely in yq or mix with shell logic. Here's one example: - # First, get the total channel count: - channel_count=$(yq e '.channels | length' "$metadata_file") + channel_count=$(cat "$metadata_file" | yq '.channels | length') # We'll build the array in bash: result="["