2024-10-08 14:02:58 +02:00
|
|
|
name: Locales lint for Crowdin
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches-ignore:
|
|
|
|
- 'l10n_master'
|
|
|
|
- 'cf-pages'
|
|
|
|
paths:
|
|
|
|
- '**/messages.json'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2024-10-08 14:02:58 +02:00
|
|
|
- name: Checkout base branch repo
|
2024-10-17 16:45:49 +02:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2024-10-08 14:02:58 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.base.sha }}
|
|
|
|
path: base
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Compare
|
|
|
|
run: |
|
|
|
|
npm run test:locales
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "Lint check successful."
|
|
|
|
else
|
|
|
|
echo "Lint check failed."
|
|
|
|
exit 1
|
|
|
|
fi
|