-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (37 loc) · 1.39 KB
/
export.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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