Generate combined service list fix.
This commit is contained in:
@@ -46,7 +46,11 @@ jobs:
|
||||
while IFS= read -r f; do
|
||||
[ -z "$f" ] && continue
|
||||
echo "Processing $f"
|
||||
yq eval-all --yaml-fix-merge-anchor-to-spec=true '.services | to_entries | map({"service": .key, "image": .value.image})' "$f" >> temp_services.json
|
||||
# Extract JSON array for this compose file
|
||||
yq -o=json '.services | to_entries | map({service: .key, image: .value.image})' "$f" > tmp.json
|
||||
# Merge all arrays into one JSON array-of-arrays
|
||||
jq -s 'add' temp_services.json tmp.json > temp_merged.json
|
||||
mv temp_merged.json temp_services.json
|
||||
FOUND=1
|
||||
done <<< "${{ steps.find-compose-files.outputs.compose_files }}"
|
||||
|
||||
@@ -55,7 +59,7 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
jq -s add temp_services.json | jq 'unique_by(.service)' > services.json
|
||||
jq 'unique_by(.service)' temp_services.json > services.json
|
||||
|
||||
- name: Generate Markdown Table
|
||||
uses: gazab/create-markdown-table@6686233d7008e8d8b9d4bbdbfd1fb1ae510019f0 # v1.0.7
|
||||
|
||||
Reference in New Issue
Block a user