forked from RocketChat/Rocket.Chat.ReactNative
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.02 KB
/
organize_translations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: organize translations
on:
push:
paths:
- 'app/i18n/locales/**.json'
jobs:
organize-and-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Run script to organize JSON keys
run: node scripts/organize-translations.js
- name: Get changed files
id: git-check
uses: tj-actions/changed-files@v42
with:
files: |
**.json
- name: List all changed files
if: steps.git-check.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.git-check.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
- name: Commit and push if changes
if: steps.git-check.outputs.any_changed == 'true'
uses: EndBug/add-and-commit@v9
with:
message: 'action: organized translations'