Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
richm committed Jan 30, 2025
1 parent 541c4ff commit 78f3d71
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,17 @@ jobs:
python -c 'import sys; import yaml
hsh1 = yaml.safe_load(open(sys.argv[1]))
hsh2 = yaml.safe_load(open(sys.argv[2]))
coll = list(set(hsh1["collections"]).union(hsh2["collections"]))
hsh1["collections"] = coll
coll = {}
for item in hsh1["collections"] + hsh2["collections"]:
if isinstance(item, dict):
name = item["name"]
rec = item
else:
name = item # assume string
rec = {"name": name}
if name not in coll:
coll[name] = rec
hsh1["collections"] = list(coll.values())
yaml.safe_dump(hsh1, open(sys.argv[3], "w"))' "$meta_req_file" "$test_req_file" "$coll_req_file"
elif [ -f "$meta_req_file" ]; then
coll_req_file="$meta_req_file"
Expand Down

0 comments on commit 78f3d71

Please sign in to comment.