Update .forgejo/workflows/build-images.yaml
This commit is contained in:
parent
c0b8ba43ae
commit
cc92803418
1 changed files with 1 additions and 14 deletions
|
@ -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="["
|
||||
|
|
Loading…
Reference in a new issue