Skip to content

Commit

Permalink
Add compare workflow to verify against comm-l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
jfx2006 committed Jul 15, 2024
1 parent eda3553 commit c8f5333
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cmp_commstrings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 comm-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 rsync mercurial -y
- name: Clone l10n repository
uses: actions/checkout@v4
with:
path: l10n
- name: Clone comm-l10n repository
run: |
hg clone https://hg.mozilla.org/projects/comm-l10n
- name: Copy content from comm-l10n
run: |
rsync -av --exclude={".hg",".github","_configs","en-US","*/suite"} comm-l10n/. l10n/.
- name: Compare content
run: |
diff=$(git diff --ignore-blank-lines --ignore-cr-at-eol)
if [[ -n "$diff" ]]; then
echo "### There are differences between the two repositories" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "$diff" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "No differences found"
fi
working-directory: l10n

0 comments on commit c8f5333

Please sign in to comment.