2022-03-29 20:20:57 +00:00
|
|
|
name: locales-format
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-03-29 20:22:41 +00:00
|
|
|
- master
|
2022-03-29 20:20:57 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
locales-format:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: install jq
|
|
|
|
run: sudo apt install -y jq
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup bot
|
|
|
|
run: |
|
|
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
git config --local user.name "github-actions"
|
2022-03-29 20:22:41 +00:00
|
|
|
- name: Checkout master
|
|
|
|
run: git checkout master
|
2022-03-29 20:20:57 +00:00
|
|
|
- name: Fix jsons
|
|
|
|
run: find locales -type f -name '*.json' | xargs -P $(nproc) -I {} sh -c 'echo "$(jq . "$1")" > "$1"' -- {}
|
|
|
|
- name: Commit changes
|
|
|
|
run: git add locales && git commit -m 'fix locales format'
|
|
|
|
- name: Push changes
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: ${{ github.ref }}
|
|
|
|
tags: true
|