chore(ci): adjust crowdin workflows

Co-authored-by: Typed SIGTERM <145281501+typed-sigterm@users.noreply.github.com>
This commit is contained in:
Neko Ayaka
2025-12-20 21:37:17 +08:00
co-authored by Typed SIGTERM
parent b2e02a25cb
commit 7ece495f44
2 changed files with 27 additions and 2 deletions
@@ -1,4 +1,4 @@
name: Sync Translations from Crowdin
name: Crowdin sync translations from remote
on:
schedule:
@@ -23,7 +23,7 @@ jobs:
create_pull_request: true
commit_message: 'chore(i18n): update translations'
pull_request_title: 'chore(i18n): update translations'
pull_request_body: 'This PR contains updated translations from Crowdin. Created from [GitHub Actions](https://github.com/moeru-ai/airi/blob/main/.github/workflows/crowdin.yaml).\n\n You can review the source of translations [here](https://crowdin.com/project/proj-airi)'
pull_request_body: 'This PR contains updated translations from Crowdin. Created from [GitHub Actions](https://github.com/moeru-ai/airi/blob/main/.github/workflows/crowdin-cron-sync.yml).\n\n You can review the source of translations [here](https://crowdin.com/project/proj-airi)'
pull_request_base_branch_name: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,25 @@
name: Crowdin upload translations to remote
on:
workflow_dispatch:
permissions:
contents: read
jobs:
upload-translations-to-crowdin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# NOTICE: Uploading local translations to Crowdin can overwrite remote changes and discard pending sync work. Run only when intentionally pushing the repo state upstream. See https://github.com/moeru-ai/airi/pull/813#issuecomment-3669328994 and https://support.crowdin.com/enterprise/github-integration/ (explained by @typed-sigterm); Mastodon follows a similar flow.
- uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: true
download_translations: false
localization_branch_name: crowdin
create_pull_request: false
commit_message: 'chore(i18n): push translations to crowdin'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}