From 4a682bb9c077186f53fefa042738070387ff61d0 Mon Sep 17 00:00:00 2001 From: Natsu Date: Mon, 1 Jul 2024 11:26:11 +0700 Subject: [PATCH] chore(dispatch.yml): update Prettier command to include both single-level and nested JSON files chore(dispatch.yml): update Sort JSON files command to use -exec {} + instead of -exec {} \; chore(dispatch.yml): update git add command to include both single-level and nested JSON files --- .github/workflows/dispatch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index 114d999e..7d2c46b9 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -58,10 +58,10 @@ jobs: run: npm install --global prettier sort-json - name: Run Prettier - run: prettier --write "local-files/**/*.json" + run: prettier --write "local-files/*.json" "local-files/**/*.json" - name: Sort JSON files - run: find local-files -type f -name '*.json' -not -path "local-files/genericTrans/lyrics/*" -exec sort-json {} \; + run: find local-files -type f -name '*.json' -not -path "local-files/genericTrans/lyrics/*" -exec sort-json {} + - name: Authorize Git run: | @@ -70,7 +70,7 @@ jobs: - name: Commit Changes run: | - git add local-files/**/*.json + git add local-files/*.json local-files/**/*.json git commit -m "chore(format): Format and Sort JSON files" git push origin main env: