Skip to content

Update moz.l10n, add hacky verbose resource diff (#96) #138

Update moz.l10n, add hacky verbose resource diff (#96)

Update moz.l10n, add hacky verbose resource diff (#96) #138

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
name: Compare gecko-strings
on:
push:
branches:
- main
schedule:
- cron: "0 11 * * 1"
workflow_dispatch:
jobs:
fetch:
name: L10n automation
runs-on: ubuntu-latest
steps:
- name: Install Linux packages
run: |
sudo apt update
sudo apt install mercurial -y
- name: Clone l10n repository
uses: actions/checkout@v4
with:
path: l10n
- run: hg clone https://hg.mozilla.org/l10n/gecko-strings
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: l10n/.github/scripts/requirements.txt
- run: pip install -r l10n/.github/scripts/requirements.txt
- name: Compare content
run: |
diff=$(python l10n/.github/scripts/diff.py l10n gecko-strings --ignore LICENSE README.md || true)
if [[ -n "$diff" ]]; then
echo "### There are differences between the two repositories" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "$diff" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "No differences found"
fi