File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 7676 run : |
7777 echo "Full repo-properties.json file is:"
7878 cat repo-properties.json
79+
80+ - name : Convert JSON to formatted YAML
81+ shell : bash
82+ run : |
83+ ORG_NAME=$(cat org-name.txt)
84+ echo "org: $ORG_NAME" > repo-properties.yaml
85+ echo "repositories:" >> repo-properties.yaml
86+
87+ jq -r 'to_entries[] |
88+ .key as $repoName |
89+ " - name: \( $repoName)\n last-date-modified: \"\"\n " +
90+ (.value | map(" \(.property_name) : \"\(.value)\"") | join("\n"))' repo-properties.json >> repo-properties.yaml
91+
92+ echo "YAML written to repo-properties.yaml"
93+
94+ - name : Print out the repo-properties.yaml
95+ shell : bash
96+ run : |
97+ echo "Full repo-properties.yaml file is:"
98+ cat repo-properties.yaml
99+
You can’t perform that action at this time.
0 commit comments