Skip to content

Export translations #456

Export translations

Export translations #456

Workflow file for this run

name: Export translations
on:
schedule:
- cron: "0 12 * * *" # Run daily at 12PM UTC
workflow_dispatch:
jobs:
copy:
name: Export translations
runs-on: ubuntu-latest
steps:
- name: Clone l10n repository
uses: actions/checkout@v4
with:
path: l10n_repo
- name: Clone main code repository
uses: actions/checkout@v4
with:
repository: mozilla/blurts-server
fetch-depth: 0
path: code_repo
- name: Copy translation files
run: |
# Use rsync to sync the content of the "locales" folder
# Exclude hidden files, the "en" folder, markdown files, license.
rsync -av --progress --exclude="en/*" --exclude="*.md" --exclude="LICENSE" --exclude=".*" l10n_repo/ code_repo/locales/ --delete
- name: Get the current date for PR title
run: echo "current_date=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
- uses: peter-evans/create-pull-request@v6
with:
path: code_repo
token: ${{ secrets.MONITOR_L10N_TOKEN }}
branch: l10n_automation
author: mozilla-pontoon <[email protected]>
title: "Import translations from l10n repository (${{ env.current_date }})"
commit-message: "Import translations from l10n repository (${{ env.current_date }})"
labels: l10n
delete-branch: true