From 78f58dbec36997a9fa313d6bdc75d3888a2ecade Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 15 Mar 2022 14:22:57 +0100 Subject: [PATCH] Update sort_json.yaml --- .github/workflows/sort_json.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sort_json.yaml b/.github/workflows/sort_json.yaml index 044a5e426..ae812a5ee 100644 --- a/.github/workflows/sort_json.yaml +++ b/.github/workflows/sort_json.yaml @@ -11,11 +11,21 @@ jobs: sort_json: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - name: Checkout Repo + uses: actions/checkout@v3 - name: Run script file + 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 "::set-output name=changed::1" done 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