mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-16 12:29:10 +02:00
Update sort_json.yaml
This commit is contained in:
12
.github/workflows/sort_json.yaml
vendored
12
.github/workflows/sort_json.yaml
vendored
@@ -11,11 +11,21 @@ jobs:
|
|||||||
sort_json:
|
sort_json:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
- name: Run script file
|
- name: Run script file
|
||||||
|
id: sort
|
||||||
run: |
|
run: |
|
||||||
for files in */*.json; do
|
for files in */*.json; do
|
||||||
echo "Sorting $files"
|
echo "Sorting $files"
|
||||||
jq --sort-keys . "$files" > config2.json && cat config2.json > "$files" && rm config2.json
|
jq --sort-keys . "$files" > config2.json && cat config2.json > "$files" && rm config2.json
|
||||||
|
echo "::set-output name=changed::1"
|
||||||
done
|
done
|
||||||
shell: bash
|
shell: bash
|
||||||
|
- name: Create New Pull Request If Needed
|
||||||
|
if: steps.sort.outputs.changed != ''
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
with:
|
||||||
|
title: Json sort weekly
|
||||||
|
branch-suffix: timestamp
|
||||||
|
commit-message: Sorted json
|
||||||
|
|||||||
Reference in New Issue
Block a user