-
Notifications
You must be signed in to change notification settings - Fork 92
35 lines (32 loc) · 1.21 KB
/
check-translation-files-pr.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
name: Check translation files
on:
# Run on pull request and merge queue
pull_request:
merge_group:
# Cancel any in progress run of the workflow for a given PR
# This avoids building outdated code
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
check-translation-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
locales/*/translation.json
ios/MobileStack/*.lproj/InfoPlist.strings
files_ignore: |
locales/base/translation.json
ios/MobileStack/Base.lproj/InfoPlist.strings
- name: Fail if translation files are changed
if: ${{ (github.event_name != 'merge_group') && (github.head_ref != 'l10n/main') && (steps.changed-files.outputs.any_changed == 'true') }}
run: |
echo "❌ Only the base translation files should be modified in non-Crowdin PR's!"
echo "These translation files should not have been modified:"
echo ${{ steps.changed-files.outputs.all_changed_files }}
exit 1