Skip to content

VPN Client

VPN Client #908

Workflow file for this run

name: VPN Client
on:
push:
branches:
- main
paths:
- '.github/workflows/vpn.yaml'
- '.github/requirements.txt'
- 'l10n/xliff_l10n.py'
- 'l10n/exceptions/vpn.json'
pull_request:
branches:
- main
paths:
- '.github/workflows/vpn.yaml'
- '.github/requirements.txt'
- 'l10n/xliff_l10n.py'
- 'l10n/exceptions/vpn.json'
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
path: "scripts_repo"
- name: Clone target repository
uses: actions/checkout@v4
with:
repository: "mozilla-l10n/mozilla-vpn-client-l10n"
path: "target_repo"
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python dependencies
run: |
pip install -r scripts_repo/.github/requirements.txt
- name: Lint localization
run: >
python scripts_repo/l10n/xliff_l10n.py
--l10n target_repo/
--dest errors.txt
--exceptions scripts_repo/l10n/exceptions/vpn.json
--no-failure
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: errors-list
path: errors.txt
if-no-files-found: ignore
- name: Fail on errors
run: |
if [ -f "errors.txt" ]; then
echo "### There are errors" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat errors.txt >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
exit 1
fi