mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Sort json files
This commit is contained in:
12
.github/workflows/weekly-supelinter.yaml
vendored
12
.github/workflows/weekly-supelinter.yaml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
FIX_HTML_PRETTIER: true
|
||||
FIX_SHELL_SHFMT: true
|
||||
FIX_YAML_PRETTIER: true
|
||||
FIX_JSON: true
|
||||
FIX_JSON: false
|
||||
#FIX_JSON_PRETTIER: true
|
||||
FIX_MARKDOWN: true
|
||||
#FIX_MARKDOWN_PRETTIER: true
|
||||
@@ -58,6 +58,16 @@ jobs:
|
||||
run: |
|
||||
find . -type f \( -name "*.sh" -o -name "run" \) -exec chmod +x {} \;
|
||||
|
||||
- name: Sort json files
|
||||
id: sort
|
||||
run: |
|
||||
for files in */*.json; do
|
||||
echo "Sorting $files"
|
||||
jq --sort-keys . "$files" > config2.json && cat config2.json > "$files" && rm config2.json
|
||||
echo "changed=1" >> "$GITHUB_OUTPUT"
|
||||
done
|
||||
shell: bash
|
||||
|
||||
- name: Remove Super-Linter output (prevent checkout conflict)
|
||||
run: sudo rm -rf super-linter-output/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user