Skip to content

MAC

MAC #1056

Workflow file for this run

name: MAC
on:
push:
branches:
- main
paths:
- '.github/workflows/mac.yaml'
- '.github/requirements.txt'
- 'l10n/webext_l10n.py'
- 'l10n/exceptions/mac.json'
pull_request:
branches:
- main
paths:
- '.github/workflows/mac.yaml'
- '.github/requirements.txt'
- 'l10n/webext_l10n.py'
- 'l10n/exceptions/mac.json'
schedule:
- cron: '5 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/multi-account-containers-l10n"
path: "target_repo"
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Lint localization
run: >
python scripts_repo/l10n/webext_l10n.py
--l10n target_repo/
--ref en
--dest errors.txt
--exceptions scripts_repo/l10n/exceptions/mac.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