From 1004b2b56794614b25d9fd2069d9946aeeff9bdc Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Tue, 26 Dec 2023 12:56:43 +0530 Subject: [PATCH] chore(workflow): write formatted JSON report for Crowdin contributors --- .github/workflows/crowdin_contributors.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/crowdin_contributors.yml b/.github/workflows/crowdin_contributors.yml index 950e7c176..608109e24 100644 --- a/.github/workflows/crowdin_contributors.yml +++ b/.github/workflows/crowdin_contributors.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: {} env: - CONTRIBUTORS_JSON_FILENAME: crowdin-contributors.json + CONTRIBUTORS_JSON_FILENAME: crowdin-contributors jobs: crowdin-contributors: @@ -34,10 +34,16 @@ jobs: - name: Write JSON report uses: "DamianReeves/write-file-action@master" with: - path: ${{ env.CONTRIBUTORS_JSON_FILENAME }} + path: ${{ env.CONTRIBUTORS_JSON_FILENAME }}_staging.json write-mode: overwrite contents: ${{ steps.generate_table.outputs.json_report }} + - name: Pretty-print JSON report + run: | + sudo apt-get install jq + cat ${{ env.CONTRIBUTORS_JSON_FILENAME }}_staging.json | jq '.' > ${{ env.CONTRIBUTORS_JSON_FILENAME }}.json + rm ${{ env.CONTRIBUTORS_JSON_FILENAME }}_staging.json + - name: Upload JSON report uses: actions/upload-artifact@v3 with: