Skip to content

sync-upstream

sync-upstream #60

Workflow file for this run

name: sync-upstream
on:
schedule:
# every sunday 8AM (UTC)
- cron: '0 8 * * 0'
workflow_dispatch:
jobs:
build:
name: Sync
runs-on: ubuntu-latest
steps:
- name: Checkout
# Checkout target revision from git repository
uses: actions/checkout@v4
- name: Setup build env
# Setup build environment(install runtime, library, etc.)
run: |
bin/setup-build-env-on-ubuntu
- name: Set up JDK 17
# Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Sync submodule
# Sync submodule, which points the upstream repository to a latest revision
run: vendor/quarkus-l10n-utils/bin/sync-submodule
- name: Push changes
# Commit and Push the upstream submodule change
run: vendor/quarkus-l10n-utils/bin/push-changes "Update upstream"
- name: Update po files
# Extract texts from the original source files and update .po files
run: |
vendor/quarkus-l10n-utils/bin/update-po-files
- name: Push changes
# Commit and Push the updated .po files
run: vendor/quarkus-l10n-utils/bin/push-changes "Update .po files"
- name: Update translation stats
# Update the translation stats .csv file, which is used as an simplified dashboard ( <L10N_HOME>/l10n/stats/translation.csv )
run: vendor/quarkus-l10n-utils/bin/update-translation-stats
- name: Push changes
# Commit and Push the translation stats .csv file
run: vendor/quarkus-l10n-utils/bin/push-changes "Update translation stats"
- name: Apply fuzzy tmx
# Apply fuzzy tmx to .po files to fill fuzzy translation candidates
run: vendor/quarkus-l10n-utils/bin/translate-po-files-with-fuzzy-tmx
- name: Push changes
# Commit and Push the .po files updated by fuzzy tmx
run: vendor/quarkus-l10n-utils/bin/push-changes "Apply fuzzy translation memory"
- name: Apply tmx
# Apply tmx file to .po files to fill known translations
run: vendor/quarkus-l10n-utils/bin/translate-po-files-with-tmx
- name: Push changes
# Commit and Push the .po files updated by tmx
run: vendor/quarkus-l10n-utils/bin/push-changes "Apply translation memory"
- name: Machine translate
# Machine translate with DeepL API
run: vendor/quarkus-l10n-utils/bin/translate-po-files-with-deepl
env:
TRANSLATOR_DEEPL_APIKEY: ${{ secrets.TRANSLATOR_DEEPL_APIKEY }}
- name: Push changes
# Commit and Push the .po files updated by DeepL machine-translation
run: vendor/quarkus-l10n-utils/bin/push-changes "Add machine translation"