Add a new action

This commit is contained in:
Manav Rathi 2024-05-07 11:10:09 +05:30
parent 491b814a2e
commit e9bf6d7171
No known key found for this signature in database

View file

@ -0,0 +1,39 @@
name: "Update Crowdin translations (web)"
# This is a variant of web-crowdin.yml that also uploads the translated strings
# (in addition to the source strings). This allows us to change the strings in
# our source code for an automated refactoring (e.g. renaming a key), and then
# run this workflow to update the data in Crowdin taking our source code as the
# source of truth.
on:
# Only allow running manually.
workflow_dispatch:
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v1
with:
base_path: "web/"
config: "web/crowdin.yml"
upload_sources: true
# This is what differs from web-crowdin.yml
upload_translations: true
download_translations: true
localization_branch_name: translations/web
create_pull_request: true
skip_untranslated_strings: true
pull_request_title: "[web] Updated translations"
pull_request_body: "Updated translations from [Crowdin](https://crowdin.com/project/ente-photos-web)"
pull_request_base_branch_name: "main"
project_id: 569613
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}