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
This commit is contained in:
2024-07-01 11:26:11 +07:00
parent 242416d321
commit 4a682bb9c0

View File

@@ -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: